Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas ZILLIOX <thomas@zilliox.me>2013-08-08 03:37:12 +0400
committerThomas ZILLIOX <thomas@zilliox.me>2013-08-08 03:37:12 +0400
commit6353a269ac30b5fe6b5da8ff7c97a2e14563661c (patch)
treef028ff54049c317e817e4c62ab5ae47458837de5 /core/Twig.php
parenta440086526162d35f54fbe1f5f167256bd636e89 (diff)
parent07c430fba0014336fce6071dd8a4c1fb9c65ef25 (diff)
Merge from piwik master
Diffstat (limited to 'core/Twig.php')
-rw-r--r--core/Twig.php9
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()