mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-25 08:05:00 +00:00
remove deprecated templating component
This commit is contained in:
@@ -24,6 +24,7 @@ use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
use Twig\Environment;
|
||||
use function array_key_exists;
|
||||
use function count;
|
||||
use function in_array;
|
||||
@@ -42,20 +43,16 @@ class CustomFieldChoice extends AbstractCustomField
|
||||
|
||||
final public const OTHER_VALUE_LABEL = 'otherValueLabel';
|
||||
|
||||
private $defaultLocales;
|
||||
|
||||
/**
|
||||
* CustomFieldChoice constructor.
|
||||
*/
|
||||
public function __construct(
|
||||
TranslatorInterface $translator,
|
||||
private readonly TwigEngine $templating,
|
||||
private readonly Environment $templating,
|
||||
/**
|
||||
* @var TranslatableStringHelper Helper that find the string in current locale from an array of translation
|
||||
*/
|
||||
private readonly TranslatableStringHelper $translatableStringHelper
|
||||
) {
|
||||
$this->defaultLocales = $translator->getFallbackLocales();
|
||||
}
|
||||
|
||||
public function allowOtherChoice(CustomField $cf)
|
||||
@@ -307,7 +304,6 @@ class CustomFieldChoice extends AbstractCustomField
|
||||
'selected' => $selected,
|
||||
'multiple' => $customField->getOptions()[self::MULTIPLE],
|
||||
'expanded' => $customField->getOptions()[self::EXPANDED],
|
||||
'locales' => $this->defaultLocales,
|
||||
]
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user