| 1 | <?php |
||
| 7 | class MiscExtension extends \Twig_Extension |
||
| 8 | { |
||
| 9 | protected $container; |
||
| 10 | |||
| 11 | 17 | public function __construct(ContainerInterface $container) |
|
| 15 | |||
| 16 | 10 | public function getFunctions() |
|
| 17 | { |
||
| 18 | return array( |
||
| 19 | 10 | new \Twig_SimpleFunction('serviceExists', array($this, 'serviceExists')), |
|
| 20 | 10 | new \Twig_SimpleFunction('getParameter', array($this, 'getParameter')), |
|
| 21 | 10 | ); |
|
| 22 | } |
||
| 23 | |||
| 24 | 10 | public function getParameter($parameter) |
|
| 32 | |||
| 33 | public function serviceExists($service) |
||
| 37 | } |
||
| 38 |