mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-21 09:44:23 +00:00
fix deprecatrions: use fqcn for chill classes
This commit is contained in:
parent
ac9325a7f2
commit
65e7354437
@ -26,6 +26,7 @@ use Chill\MainBundle\Templating\TranslatableStringHelper;
|
|||||||
use Chill\CustomFieldsBundle\Entity\CustomFieldLongChoice\Option;
|
use Chill\CustomFieldsBundle\Entity\CustomFieldLongChoice\Option;
|
||||||
use Chill\CustomFieldsBundle\Form\DataTransformer\CustomFieldDataTransformer;
|
use Chill\CustomFieldsBundle\Form\DataTransformer\CustomFieldDataTransformer;
|
||||||
use Symfony\Bridge\Twig\TwigEngine;
|
use Symfony\Bridge\Twig\TwigEngine;
|
||||||
|
use Chill\MainBundle\Form\Type\Select2ChoiceType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -69,7 +70,7 @@ class CustomFieldLongChoice extends AbstractCustomField
|
|||||||
false, true);
|
false, true);
|
||||||
//create a local copy of translatable string helper
|
//create a local copy of translatable string helper
|
||||||
$translatableStringHelper = $this->translatableStringHelper;
|
$translatableStringHelper = $this->translatableStringHelper;
|
||||||
$builder->add($customField->getSlug(), 'select2_choice', array(
|
$builder->add($customField->getSlug(), Select2ChoiceType::class, array(
|
||||||
'choices' => $entries,
|
'choices' => $entries,
|
||||||
'choice_label' => function(Option $option) use ($translatableStringHelper) {
|
'choice_label' => function(Option $option) use ($translatableStringHelper) {
|
||||||
return $translatableStringHelper->localize($option->getText());
|
return $translatableStringHelper->localize($option->getText());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user