mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-28 10:33:49 +00:00
fix deprecation error: use gqcn and pass option in array
This commit is contained in:
@@ -88,7 +88,8 @@ class CustomFieldChoice extends AbstractCustomField
|
||||
'multiple' => $customFieldOptions[self::MULTIPLE],
|
||||
'choices' => array_combine(array_values($choices),array_keys($choices)),
|
||||
'required' => $customField->isRequired(),
|
||||
'label' => $this->translatableStringHelper->localize($customField->getName()));
|
||||
'label' => $this->translatableStringHelper->localize($customField->getName())
|
||||
);
|
||||
|
||||
//if allow_other = true
|
||||
if ($customFieldOptions[self::ALLOW_OTHER] == true) {
|
||||
@@ -103,8 +104,10 @@ class CustomFieldChoice extends AbstractCustomField
|
||||
$builder
|
||||
->create(
|
||||
$customField->getSlug(),
|
||||
new ChoiceWithOtherType($otherValueLabel),
|
||||
$options)
|
||||
ChoiceWithOtherType::class,
|
||||
$options,
|
||||
array('other_value_label'=> $otherValueLabel)
|
||||
)
|
||||
->addModelTransformer(new CustomFieldDataTransformer($this, $customField)));
|
||||
|
||||
} else { //if allow_other = false
|
||||
|
Reference in New Issue
Block a user