mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-25 00:53:48 +00:00
remove unused locale and request stack
The locale resolving is delegated to TranslatableStringHelper
This commit is contained in:
@@ -45,12 +45,6 @@ class CustomFieldChoice extends AbstractCustomField
|
||||
const MULTIPLE = 'multiple';
|
||||
const EXPANDED = 'expanded';
|
||||
const CHOICES = 'choices';
|
||||
|
||||
/**
|
||||
*
|
||||
* @var RequestStack
|
||||
*/
|
||||
private $requestStack;
|
||||
|
||||
private $defaultLocales;
|
||||
|
||||
@@ -66,12 +60,10 @@ class CustomFieldChoice extends AbstractCustomField
|
||||
private $translatableStringHelper;
|
||||
|
||||
public function __construct(
|
||||
RequestStack $requestStack,
|
||||
Translator $translator,
|
||||
TwigEngine $templating,
|
||||
TranslatableStringHelper $translatableStringHelper)
|
||||
{
|
||||
$this->requestStack = $requestStack;
|
||||
$this->defaultLocales = $translator->getFallbackLocales();
|
||||
$this->templating = $templating;
|
||||
$this->translatableStringHelper = $translatableStringHelper;
|
||||
@@ -80,7 +72,6 @@ class CustomFieldChoice extends AbstractCustomField
|
||||
public function buildForm(FormBuilderInterface $builder, CustomField $customField)
|
||||
{
|
||||
//prepare choices
|
||||
$locale = $this->requestStack->getCurrentRequest()->getLocale();
|
||||
$choices = array();
|
||||
$customFieldOptions = $customField->getOptions();
|
||||
|
||||
|
Reference in New Issue
Block a user