From 9e9beaa4c60a756b61eb8b536811b3d0b42d8ae8 Mon Sep 17 00:00:00 2001 From: Julien Deniau Date: Wed, 23 Dec 2015 09:27:46 +0100 Subject: [PATCH] Fixes #74 --- src/Ladybug/Renderer/Twig/Extension/BaseExtension.php | 8 ++++---- src/Ladybug/Renderer/Twig/Extension/ConsoleExtension.php | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Ladybug/Renderer/Twig/Extension/BaseExtension.php b/src/Ladybug/Renderer/Twig/Extension/BaseExtension.php index d10b0c8..9e657a3 100644 --- a/src/Ladybug/Renderer/Twig/Extension/BaseExtension.php +++ b/src/Ladybug/Renderer/Twig/Extension/BaseExtension.php @@ -40,8 +40,8 @@ public function getName() public function getFunctions() { return array( - 'render_type' => new \Twig_SimpleFunction( - 'renderTypeFunction', + new \Twig_SimpleFunction( + 'render_type', array($this, 'renderTypeFunction'), array('needs_environment' => true, 'is_safe' => array('html')) ) @@ -56,8 +56,8 @@ public function getFunctions() public function getFilters() { return array( - 'repeat' => new \Twig_SimpleFilter('getRepeat', array($this, 'getRepeat'), array('is_safe' => array('html'))), - 'pad' => new \Twig_SimpleFilter('getPad', array($this, 'getPad')), + new \Twig_SimpleFilter('repeat', array($this, 'getRepeat'), array('is_safe' => array('html'))), + new \Twig_SimpleFilter('pad', array($this, 'getPad')), ); } diff --git a/src/Ladybug/Renderer/Twig/Extension/ConsoleExtension.php b/src/Ladybug/Renderer/Twig/Extension/ConsoleExtension.php index 328c2ae..0e56fa1 100644 --- a/src/Ladybug/Renderer/Twig/Extension/ConsoleExtension.php +++ b/src/Ladybug/Renderer/Twig/Extension/ConsoleExtension.php @@ -32,7 +32,7 @@ public function getName() public function getFilters() { return array_merge(parent::getFilters(), array( - 'tags' => new \Twig_SimpleFilter('getTags', array($this, 'getTags'), array('is_safe' => array('html'))), + new \Twig_SimpleFilter('tags', array($this, 'getTags'), array('is_safe' => array('html'))), )); } @@ -44,5 +44,4 @@ public function getTags($text) return $textTags; } - }