| 1 | <?php |
||
| 21 | class CropExtension extends \Twig_Extension |
||
| 22 | { |
||
| 23 | /** |
||
| 24 | * @var \Symfony\Component\Routing\Router |
||
| 25 | */ |
||
| 26 | protected $router; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @var string |
||
| 30 | */ |
||
| 31 | protected $routeName; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Constructor |
||
| 35 | * |
||
| 36 | * @param \Symfony\Component\Routing\Router $router |
||
| 37 | * @param string $routeName |
||
| 38 | */ |
||
| 39 | public function __construct(Router $router, $routeName) |
||
| 44 | |||
| 45 | /** |
||
| 46 | * {@inheritDoc} |
||
| 47 | */ |
||
| 48 | public function getFunctions() |
||
| 57 | |||
| 58 | /** |
||
| 59 | * Get crop endpoint url |
||
| 60 | * |
||
| 61 | * @param $endpoint |
||
| 62 | * @param array $parameters |
||
| 63 | * @param int $absolute |
||
| 64 | * |
||
| 65 | * @return string |
||
| 66 | */ |
||
| 67 | public function getCropEndpoint( |
||
| 76 | |||
| 77 | /** |
||
| 78 | * {@inheritdoc} |
||
| 79 | */ |
||
| 80 | public function getName() |
||
| 84 | } |
||
| 85 |