| Total Complexity | 5 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class ObjectPositionExtension extends \Twig_Extension |
||
| 9 | { |
||
| 10 | use TwigTrait; |
||
| 11 | |||
| 12 | const NAME = 'position_object'; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * PositionHandler. |
||
| 16 | */ |
||
| 17 | private $positionService; |
||
| 18 | |||
| 19 | public function __construct(PositionHandler $positionService, $container) |
||
| 20 | { |
||
| 21 | $this->positionService = $positionService; |
||
| 22 | $this->shortFunctions = $container->hasParameter('sludio_helper.script.short_functions') && $container->getParameter('sludio_helper.script.short_functions'); |
||
|
|
|||
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Returns the name of the extension. |
||
| 27 | * |
||
| 28 | * @return string The extension name |
||
| 29 | */ |
||
| 30 | public function getName() |
||
| 33 | } |
||
| 34 | |||
| 35 | public function getFunctions() |
||
| 36 | { |
||
| 37 | $input = [ |
||
| 38 | self::NAME => 'getter', |
||
| 39 | ]; |
||
| 40 | |||
| 41 | return $this->makeArray($input, 'function'); |
||
| 42 | } |
||
| 43 | |||
| 44 | public function getter($entity) |
||
| 49 | } |
||
| 50 | } |
||
| 51 |