Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
49 | public function loadTwig(string $path = null): Environment |
||
50 | { |
||
51 | $path = $path ?? self::VIEWS_PREFIX; |
||
52 | $devMode = boolval($this->config->getConfigItem('devmode')); |
||
53 | $cache = $devMode ? false : __DIR__ . '/../../var/cache/views/'; |
||
54 | $loader = new FilesystemLoader($path); |
||
55 | $this->twig = new Environment($loader, ['cache' => $cache, 'debug' => $devMode]); |
||
56 | return $this->twig; |
||
57 | } |
||
58 | |||
73 |