Merge branch '3.3' into 3.4
* 3.3: moved method to function marked method as being internal
This commit is contained in:
commit
f37096c66d
@ -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,11 +166,6 @@ class FormExtension extends AbstractExtension implements InitRuntimeInterface
|
||||
unset($this->$name);
|
||||
}
|
||||
|
||||
public function isRootForm(FormView $formView)
|
||||
{
|
||||
return null === $formView->parent;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
@ -199,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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user