From ff135c034c61ca42cb9e346e873cf411f6ec3a4a Mon Sep 17 00:00:00 2001 From: slawkens Date: Mon, 15 Oct 2018 17:34:10 +0200 Subject: [PATCH] Add Extension Twig_Extension_Debug if env is 'dev' --- system/twig.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/system/twig.php b/system/twig.php index 5c7444fe..4ddedba8 100644 --- a/system/twig.php +++ b/system/twig.php @@ -10,6 +10,10 @@ $twig = new Twig_Environment($twig_loader, array( 'auto_reload' => $dev_mode, 'debug' => $dev_mode )); + +if($dev_mode) { + $twig->addExtension(new Twig_Extension_Debug()); +} unset($dev_mode); $function = new Twig_SimpleFunction('getStyle', function ($i) {