mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 05:44:24 +00:00
fix deprecations: use the fqcn for choiceType
This commit is contained in:
parent
c4f7256236
commit
56a695e66e
@ -116,7 +116,7 @@ class CSVFormatter implements FormatterInterface
|
|||||||
*/
|
*/
|
||||||
private function appendAggregatorForm(FormBuilderInterface $builder, $nbAggregators)
|
private function appendAggregatorForm(FormBuilderInterface $builder, $nbAggregators)
|
||||||
{
|
{
|
||||||
$builder->add('order', 'choice', array(
|
$builder->add('order', ChoiceType::class, array(
|
||||||
'choices' => array_combine(
|
'choices' => array_combine(
|
||||||
range(1, $nbAggregators),
|
range(1, $nbAggregators),
|
||||||
range(1, $nbAggregators)
|
range(1, $nbAggregators)
|
||||||
@ -125,7 +125,7 @@ class CSVFormatter implements FormatterInterface
|
|||||||
'expanded' => false
|
'expanded' => false
|
||||||
));
|
));
|
||||||
|
|
||||||
$builder->add('position', 'choice', array(
|
$builder->add('position', ChoiceType::class, array(
|
||||||
'choices' => array(
|
'choices' => array(
|
||||||
'row' => 'r',
|
'row' => 'r',
|
||||||
'column' => 'c'
|
'column' => 'c'
|
||||||
|
@ -189,7 +189,7 @@ class SpreadSheetFormatter implements FormatterInterface
|
|||||||
*/
|
*/
|
||||||
private function appendAggregatorForm(FormBuilderInterface $builder, $nbAggregators)
|
private function appendAggregatorForm(FormBuilderInterface $builder, $nbAggregators)
|
||||||
{
|
{
|
||||||
$builder->add('order', 'choice', array(
|
$builder->add('order', ChoiceType::class, array(
|
||||||
'choices' => array_combine(
|
'choices' => array_combine(
|
||||||
range(1, $nbAggregators),
|
range(1, $nbAggregators),
|
||||||
range(1, $nbAggregators)
|
range(1, $nbAggregators)
|
||||||
|
@ -119,7 +119,7 @@ trait AppendScopeChoiceTypeTrait
|
|||||||
$form = $event->getForm();
|
$form = $event->getForm();
|
||||||
$form->add(
|
$form->add(
|
||||||
$builder
|
$builder
|
||||||
->create($name, 'choice', array(
|
->create($name, ChoiceType::class, array(
|
||||||
'choices' => $choices,
|
'choices' => $choices,
|
||||||
'auto_initialize' => false
|
'auto_initialize' => false
|
||||||
)
|
)
|
||||||
|
@ -85,7 +85,7 @@ class ComposedRoleScopeType extends AbstractType
|
|||||||
}
|
}
|
||||||
|
|
||||||
$builder
|
$builder
|
||||||
->add('role', 'choice', array(
|
->add('role', ChoiceType::class, array(
|
||||||
'choices' => $values,
|
'choices' => $values,
|
||||||
'placeholder' => 'Choose amongst roles',
|
'placeholder' => 'Choose amongst roles',
|
||||||
'choice_attr' => function($role) use ($rolesWithoutScopes) {
|
'choice_attr' => function($role) use ($rolesWithoutScopes) {
|
||||||
|
@ -51,7 +51,7 @@ class PickFormatterType extends AbstractType
|
|||||||
$choices[$formatter->getName()] = $alias;
|
$choices[$formatter->getName()] = $alias;
|
||||||
}
|
}
|
||||||
|
|
||||||
$builder->add('alias', 'choice', array(
|
$builder->add('alias', ChoiceType::class, array(
|
||||||
'choices' => $choices,
|
'choices' => $choices,
|
||||||
'choices_as_values' => true,
|
'choices_as_values' => true,
|
||||||
'multiple' => false
|
'multiple' => false
|
||||||
|
@ -5,6 +5,7 @@ namespace Chill\MainBundle\Form;
|
|||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||||
use Chill\MainBundle\Form\UserPasswordType;
|
use Chill\MainBundle\Form\UserPasswordType;
|
||||||
|
|
||||||
class UserType extends AbstractType
|
class UserType extends AbstractType
|
||||||
@ -25,7 +26,7 @@ class UserType extends AbstractType
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
$builder->add($builder
|
$builder->add($builder
|
||||||
->create('enabled', 'choice', array(
|
->create('enabled', ChoiceType::class, array(
|
||||||
'choices' => array(
|
'choices' => array(
|
||||||
0 => 'Disabled, the user is not allowed to login',
|
0 => 'Disabled, the user is not allowed to login',
|
||||||
1 => 'Enabled, the user is active'
|
1 => 'Enabled, the user is active'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user