fix sf4 deprecated: remove choices_as_values form option

This commit is contained in:
Tchama 2020-07-22 17:05:24 +02:00
parent 59bf662886
commit a38208f5cf
7 changed files with 0 additions and 10 deletions

View File

@ -259,7 +259,6 @@ class CustomFieldsGroupController extends Controller
)) ))
->add('type', ChoiceType::class, array( ->add('type', ChoiceType::class, array(
'choices' => array_combine(array_values($fieldChoices),array_keys($fieldChoices)), 'choices' => array_combine(array_values($fieldChoices),array_keys($fieldChoices)),
'choices_as_values' => true
)) ))
->add('customFieldsGroup', HiddenType::class) ->add('customFieldsGroup', HiddenType::class)
->add('submit', SubmitType::class); ->add('submit', SubmitType::class);

View File

@ -130,7 +130,6 @@ class CustomFieldChoice extends AbstractCustomField
'choices' => array( 'choices' => array(
'Multiple' => '1', 'Multiple' => '1',
'Unique' => '0'), 'Unique' => '0'),
'choices_as_values' => true,
'empty_data' => '0', 'empty_data' => '0',
'label' => 'Multiplicity' 'label' => 'Multiplicity'
)) ))
@ -140,7 +139,6 @@ class CustomFieldChoice extends AbstractCustomField
'choices' => array( 'choices' => array(
'Expanded' => '1', 'Expanded' => '1',
'Non expanded' => '0'), 'Non expanded' => '0'),
'choices_as_values' => true,
'empty_data' => '0', 'empty_data' => '0',
'label' => 'Choice display' 'label' => 'Choice display'
)) ))
@ -149,7 +147,6 @@ class CustomFieldChoice extends AbstractCustomField
'choices' => array( 'choices' => array(
'No' => '0', 'No' => '0',
'Yes' => '1'), 'Yes' => '1'),
'choices_as_values' => true,
'empty_data' => '0', 'empty_data' => '0',
'expanded' => true, 'expanded' => true,
'multiple' => false 'multiple' => false

View File

@ -82,7 +82,6 @@ class CustomFieldLongChoice extends AbstractCustomField
} }
return $key->getId(); return $key->getId();
}, },
'choices_as_values' => true,
'multiple' => false, 'multiple' => false,
'expanded' => false, 'expanded' => false,
'required' => $customField->isRequired(), 'required' => $customField->isRequired(),
@ -113,7 +112,6 @@ class CustomFieldLongChoice extends AbstractCustomField
return $builder->add(self::KEY, ChoiceType::class, array( return $builder->add(self::KEY, ChoiceType::class, array(
'choices' => array_combine(array_values($choices),array_keys($choices)), 'choices' => array_combine(array_values($choices),array_keys($choices)),
'label' => 'Options key', 'label' => 'Options key',
'choices_as_values' => true
)); ));
} }

View File

@ -130,7 +130,6 @@ class CustomFieldText extends AbstractCustomField
'Multiple boxes on the line' => '1', 'Multiple boxes on the line' => '1',
'One box on the line' => '0' 'One box on the line' => '0'
), ),
'choices_as_values' => true,
'label' => 'Box appearance', 'label' => 'Box appearance',
'expanded' => True 'expanded' => True
)) ))

View File

@ -109,7 +109,6 @@ class CustomFieldTitle extends AbstractCustomField
'Subtitle' => self::TYPE_SUBTITLE 'Subtitle' => self::TYPE_SUBTITLE
), ),
'label' => 'Title level', 'label' => 'Title level',
'choices_as_values' => true
) )
); );
} }

View File

@ -49,7 +49,6 @@ class CustomFieldsGroupType extends AbstractType
->add('name', TranslatableStringFormType::class) ->add('name', TranslatableStringFormType::class)
->add('entity', ChoiceType::class, array( ->add('entity', ChoiceType::class, array(
'choices' => array_combine(array_values($entities),array_keys($entities)), 'choices' => array_combine(array_values($entities),array_keys($entities)),
'choices_as_values' => true
)) ))
; ;

View File

@ -109,7 +109,6 @@ class LinkedCustomFieldsType extends AbstractType
$options = array_merge($this->options, array( $options = array_merge($this->options, array(
'choices' => $choices, 'choices' => $choices,
'choices_as_values' => true
)); ));
$event->getForm()->getParent()->add($this->choiceName, ChoiceType::class, $event->getForm()->getParent()->add($this->choiceName, ChoiceType::class,