[Form] Fixed issues mentioned in the PR
This commit is contained in:
parent
921681658c
commit
24b764e066
@ -13,7 +13,6 @@ namespace Symfony\Bridge\Twig\Extension;
|
|||||||
|
|
||||||
use Symfony\Bridge\Twig\TokenParser\FormThemeTokenParser;
|
use Symfony\Bridge\Twig\TokenParser\FormThemeTokenParser;
|
||||||
use Symfony\Bridge\Twig\Form\TwigRendererInterface;
|
use Symfony\Bridge\Twig\Form\TwigRendererInterface;
|
||||||
use Symfony\Component\Form\FormView;
|
|
||||||
use Symfony\Component\Form\Extension\Core\View\ChoiceView;
|
use Symfony\Component\Form\Extension\Core\View\ChoiceView;
|
||||||
use Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderInterface;
|
use Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderInterface;
|
||||||
|
|
||||||
@ -63,13 +62,13 @@ class FormExtension extends \Twig_Extension
|
|||||||
public function getFunctions()
|
public function getFunctions()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
'form_enctype' => new \Twig_Function_Method($this, 'renderer->renderEnctype', array('is_safe' => array('html'))),
|
'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_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_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_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_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'))),
|
'form_rest' => new \Twig_Function_Method($this, 'renderer->renderRest', array('is_safe' => array('html'))),
|
||||||
'csrf_token' => new \Twig_Function_Method($this, 'renderer->renderCsrfToken'),
|
'csrf_token' => new \Twig_Function_Method($this, 'renderer->renderCsrfToken'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,7 +78,7 @@ class FormExtension extends \Twig_Extension
|
|||||||
public function getFilters()
|
public function getFilters()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
'humanize' => new \Twig_Filter_Method($this, 'renderer->humanize'),
|
'humanize' => new \Twig_Filter_Method($this, 'renderer->humanize'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user