diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2016-01-14 06:45:01 +0300 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2016-01-15 00:44:30 +0300 |
commit | b12c069769e856f43c6f509d6e3528031795440e (patch) | |
tree | 79ace84370835a6f4c8a06c830b49c4753c51c1b /core/Twig.php | |
parent | 95ca1edf95f0518fd09f5efffbac719b9ce0e4c3 (diff) |
add possibility to view config values, including description, default value and whether it is an adjusted config value in the ui
Diffstat (limited to 'core/Twig.php')
-rwxr-xr-x | core/Twig.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/core/Twig.php b/core/Twig.php index 06706d7b44..5968b965eb 100755 --- a/core/Twig.php +++ b/core/Twig.php @@ -104,6 +104,8 @@ class Twig $this->twig->addTokenParser(new RenderTokenParser()); $this->addTest_false(); + $this->addTest_true(); + $this->addTest_emptyString(); } private function addTest_false() @@ -117,6 +119,28 @@ class Twig $this->twig->addTest($test); } + private function addTest_true() + { + $test = new Twig_SimpleTest( + 'true', + function ($value) { + return true === $value; + } + ); + $this->twig->addTest($test); + } + + private function addTest_emptyString() + { + $test = new Twig_SimpleTest( + 'emptyString', + function ($value) { + return '' === $value; + } + ); + $this->twig->addTest($test); + } + protected function addFunction_getJavascriptTranslations() { $getJavascriptTranslations = new Twig_SimpleFunction( |