Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
21 | private function loadTwig() |
||
22 | { |
||
23 | $this['psi_content_type.view.twig.renderer'] = function ($container) { |
||
24 | return new TwigRenderer($container['twig']); |
||
25 | }; |
||
26 | $this['twig'] = function () { |
||
27 | $twig = new \Twig_Environment(new \Twig_Loader_Filesystem(__DIR__ . '/../../templates'), [ |
||
28 | 'debug' => true, |
||
29 | 'strict_variables' => true, |
||
30 | ]); |
||
31 | |||
32 | return $twig; |
||
33 | }; |
||
34 | |||
35 | $this['twig']->addExtension(new ContentTypeExtension($this['psi_content_type.view.twig.renderer'])); |
||
36 | } |
||
37 | } |
||
38 |