* add global helper config($key) function + twig binding

This commit is contained in:
slawkens
2018-05-29 20:29:18 +02:00
parent b828b8e44a
commit de36cfd2eb
2 changed files with 18 additions and 6 deletions

View File

@@ -26,6 +26,11 @@ $function = new Twig_SimpleFunction('hook', function ($hook) {
});
$twig->addFunction($function);
$function = new Twig_SimpleFunction('config', function ($key) {
return config($key);
});
$twig->addFunction($function);
$filter = new Twig_SimpleFilter('urlencode', function ($s) {
return urlencode($s);
});