diff options
author | Fabian Becker <halfdan@xnorfz.de> | 2013-04-06 16:12:28 +0400 |
---|---|---|
committer | Fabian Becker <halfdan@xnorfz.de> | 2013-04-06 16:12:28 +0400 |
commit | d381d9821a9639339dda3080e111b5dbe4d96d65 (patch) | |
tree | 281979c6e9562209f1a9bbf141128b77f62c2a19 /core/Twig.php | |
parent | 1fe5921df39eac77615d9b14b801aab69c3408a4 (diff) |
Converted parts of Installation
Added new function to Twig.php
Converted genericForm
Diffstat (limited to 'core/Twig.php')
-rw-r--r-- | core/Twig.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/core/Twig.php b/core/Twig.php index 4bf72c3bff..6bea6f21e2 100644 --- a/core/Twig.php +++ b/core/Twig.php @@ -41,7 +41,6 @@ class Piwik_Twig $this->twig = new Twig_Environment($chainLoader, array( //'cache' => PIWIK_DOCUMENT_ROOT . '/tmp/templates_c', - 'debug' => true, ) ); $this->twig->clearTemplateCache(); @@ -101,8 +100,12 @@ class Piwik_Twig }); $this->twig->addFunction($sparklineFunction); - // ToDo REMOVE THIS CRAP - $this->twig->addExtension(new Twig_Extension_Debug()); + $postEventFunction = new Twig_SimpleFunction('postEvent', function($eventName) { + $str = ''; + Piwik_PostEvent($eventName, $str); + return $str; + }); + $this->twig->addFunction($postEventFunction); } /** |