♻️ new var_export filter for bolean values

This commit is contained in:
Pierre Goiffon
2020-12-18 17:51:43 +01:00
parent 2608c071d0
commit 8dddf90838
2 changed files with 10 additions and 6 deletions

View File

@@ -136,6 +136,10 @@ class Extension
})
);
// var_export can be used for example to transform a PHP boolean to 'true' or 'false' strings
// @see https://www.php.net/manual/fr/function.var-export.php
$oTwigEnv->addFilter(new Twig_SimpleFilter('var_export', 'var_export'));
// Function to check our current environment
// Usage in twig: {% if is_development_environment() %}