| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | public static function getRenderer($path) { |
||
| 21 | $loader = new Twig_Loader_Filesystem(); |
||
| 22 | // templates path |
||
| 23 | $loader->addPath($path); |
||
| 24 | $renderer = new Twig_Environment($loader, ['cache' => false]); |
||
| 25 | // I18n ext |
||
| 26 | $renderer->addExtension(new Twig_Extensions_Extension_Intl()); |
||
| 27 | // Scape html ext |
||
| 28 | $renderer->addExtension(new Twig_Extension_Escaper('html')); |
||
| 29 | return $renderer; |
||
| 30 | } |
||
| 33 |