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