From 93e136b306f585b6f37fc869416b2f5c09b30fd6 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 4 Dec 2017 10:22:59 -0800 Subject: [PATCH] moved method to function --- .../Bridge/Twig/Extension/FormExtension.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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; +}