diff options
Diffstat (limited to 'core/Twig.php')
-rw-r--r-- | core/Twig.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/Twig.php b/core/Twig.php index 0520d242d7..3155f5b0d8 100644 --- a/core/Twig.php +++ b/core/Twig.php @@ -71,6 +71,16 @@ class Twig $this->addFunction_sparkline(); $this->addFunction_postEvent(); $this->addFunction_isPluginLoaded(); + $this->addFunction_getJavascriptTranslations(); + } + + protected function addFunction_getJavascriptTranslations() + { + $getJavascriptTranslations = new Twig_SimpleFunction( + 'getJavascriptTranslations', + array(Translate::getInstance(), 'getJavascriptTranslations') + ); + $this->twig->addFunction($getJavascriptTranslations); } protected function addFunction_isPluginLoaded() |