diff options
author | Thomas ZILLIOX <thomas@zilliox.me> | 2013-08-08 03:37:12 +0400 |
---|---|---|
committer | Thomas ZILLIOX <thomas@zilliox.me> | 2013-08-08 03:37:12 +0400 |
commit | 6353a269ac30b5fe6b5da8ff7c97a2e14563661c (patch) | |
tree | f028ff54049c317e817e4c62ab5ae47458837de5 /core/Twig.php | |
parent | a440086526162d35f54fbe1f5f167256bd636e89 (diff) | |
parent | 07c430fba0014336fce6071dd8a4c1fb9c65ef25 (diff) |
Merge from piwik master
Diffstat (limited to 'core/Twig.php')
-rw-r--r-- | core/Twig.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/Twig.php b/core/Twig.php index f8325a1ce5..4b32e4931c 100644 --- a/core/Twig.php +++ b/core/Twig.php @@ -73,6 +73,15 @@ class Twig $this->addFunction_loadJavascriptTranslations(); $this->addFunction_sparkline(); $this->addFunction_postEvent(); + $this->addFunction_isPluginLoaded(); + } + + protected function addFunction_isPluginLoaded() + { + $isPluginLoadedFunction = new Twig_SimpleFunction('isPluginLoaded', function ($pluginName) { + return PluginsManager::getInstance()->isPluginLoaded($pluginName); + }); + $this->twig->addFunction($isPluginLoadedFunction); } protected function addFunction_includeAssets() |