fix deprecations: use choices_as_values=true and flip content of the choice options

This commit is contained in:
nobohan 2018-04-04 17:54:17 +02:00
parent 95f32a8fcb
commit 4143e773b6
2 changed files with 72 additions and 70 deletions

View File

@ -99,6 +99,7 @@ class ListActivity implements ListInterface
'multiple' => true,
'expanded' => true,
'choices' => array_combine($this->fields, $this->fields),
'choices_as_values' => true,
'label' => 'Fields to include in export',
'constraints' => [new Callback(array(
'callback' => function($selected, ExecutionContextInterface $context) {

View File

@ -102,9 +102,10 @@ class ActivityType extends AbstractType
->add('attendee', ChoiceType::class, array(
'expanded' => true,
'required' => false,
'choices_as_values' => true,
'choices' => array(
true => 'present',
false => 'not present'
'present' => true,
'not present' => false
)
))
->add('user')