From 24b764e06687d7c172df55943fba1ea9e9f277e4 Mon Sep 17 00:00:00 2001 From: Bernhard Schussek Date: Sat, 21 Jul 2012 19:45:31 +0200 Subject: [PATCH] [Form] Fixed issues mentioned in the PR --- .../Bridge/Twig/Extension/FormExtension.php | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/Symfony/Bridge/Twig/Extension/FormExtension.php b/src/Symfony/Bridge/Twig/Extension/FormExtension.php index 8122f6cbee..0a5f356350 100644 --- a/src/Symfony/Bridge/Twig/Extension/FormExtension.php +++ b/src/Symfony/Bridge/Twig/Extension/FormExtension.php @@ -13,7 +13,6 @@ namespace Symfony\Bridge\Twig\Extension; use Symfony\Bridge\Twig\TokenParser\FormThemeTokenParser; use Symfony\Bridge\Twig\Form\TwigRendererInterface; -use Symfony\Component\Form\FormView; use Symfony\Component\Form\Extension\Core\View\ChoiceView; use Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderInterface; @@ -63,13 +62,13 @@ class FormExtension extends \Twig_Extension public function getFunctions() { return array( - 'form_enctype' => new \Twig_Function_Method($this, 'renderer->renderEnctype', array('is_safe' => array('html'))), - 'form_widget' => new \Twig_Function_Method($this, 'renderer->renderWidget', array('is_safe' => array('html'))), - 'form_errors' => new \Twig_Function_Method($this, 'renderer->renderErrors', array('is_safe' => array('html'))), - 'form_label' => new \Twig_Function_Method($this, 'renderer->renderLabel', array('is_safe' => array('html'))), - 'form_row' => new \Twig_Function_Method($this, 'renderer->renderRow', array('is_safe' => array('html'))), - 'form_rest' => new \Twig_Function_Method($this, 'renderer->renderRest', array('is_safe' => array('html'))), - 'csrf_token' => new \Twig_Function_Method($this, 'renderer->renderCsrfToken'), + 'form_enctype' => new \Twig_Function_Method($this, 'renderer->renderEnctype', array('is_safe' => array('html'))), + 'form_widget' => new \Twig_Function_Method($this, 'renderer->renderWidget', array('is_safe' => array('html'))), + 'form_errors' => new \Twig_Function_Method($this, 'renderer->renderErrors', array('is_safe' => array('html'))), + 'form_label' => new \Twig_Function_Method($this, 'renderer->renderLabel', array('is_safe' => array('html'))), + 'form_row' => new \Twig_Function_Method($this, 'renderer->renderRow', array('is_safe' => array('html'))), + 'form_rest' => new \Twig_Function_Method($this, 'renderer->renderRest', array('is_safe' => array('html'))), + 'csrf_token' => new \Twig_Function_Method($this, 'renderer->renderCsrfToken'), ); } @@ -79,7 +78,7 @@ class FormExtension extends \Twig_Extension public function getFilters() { return array( - 'humanize' => new \Twig_Filter_Method($this, 'renderer->humanize'), + 'humanize' => new \Twig_Filter_Method($this, 'renderer->humanize'), ); }