diff --git a/src/Symfony/Bridge/Twig/Extension/FormExtension.php b/src/Symfony/Bridge/Twig/Extension/FormExtension.php index 6e6274dcc4..beed1c95b3 100644 --- a/src/Symfony/Bridge/Twig/Extension/FormExtension.php +++ b/src/Symfony/Bridge/Twig/Extension/FormExtension.php @@ -106,7 +106,7 @@ class FormExtension extends AbstractExtension implements InitRuntimeInterface { return array( new TwigTest('selectedchoice', 'Symfony\Bridge\Twig\Extension\twig_is_selected_choice'), - new TwigTest('rootform', array($this, 'isRootForm')), + new TwigTest('rootform', 'Symfony\Bridge\Twig\Extension\twig_is_root_form'), ); } @@ -166,14 +166,6 @@ class FormExtension extends AbstractExtension implements InitRuntimeInterface unset($this->$name); } - /** - * @internal - */ - public function isRootForm(FormView $formView) - { - return null === $formView->parent; - } - /** * {@inheritdoc} */ @@ -202,3 +194,11 @@ function twig_is_selected_choice(ChoiceView $choice, $selectedValue) return $choice->value === $selectedValue; } + +/** + * @internal + */ +function twig_is_root_form(FormView $formView) +{ + return null === $formView->parent; +}