| 1 | <?php | ||
| 12 | class MaterializeExtension extends \Twig_Extension implements \Twig_Extension_GlobalsInterface | ||
| 13 | { | ||
| 14 | /** | ||
| 15 | * @var \Symfony\Component\DependencyInjection\ContainerInterface | ||
| 16 | */ | ||
| 17 | protected $container; | ||
| 18 | |||
| 19 | /** | ||
| 20 | * @param ContainerInterface $container | ||
| 21 | */ | ||
| 22 | public function __construct(ContainerInterface $container) | ||
| 26 | |||
| 27 | /** | ||
| 28 | * @return array | ||
| 29 | */ | ||
| 30 | public function getGlobals() | ||
| 31 |     { | ||
| 32 | return array( | ||
| 33 |             'materialize' => $this->container->getParameter('materialize') | ||
| 34 | ); | ||
| 35 | } | ||
| 36 | |||
| 37 | /** | ||
| 38 | * Returns the name of the extension. | ||
| 39 | * | ||
| 40 | * @return string The extension name | ||
| 41 | */ | ||
| 42 | public function getName() | ||
| 46 | } | ||
| 47 |