remove unused locale and request stack

The locale resolving is delegated to TranslatableStringHelper
This commit is contained in:
2016-03-21 00:00:58 +01:00
parent 9bf7b4ac60
commit b97a550e2b
2 changed files with 0 additions and 10 deletions

View File

@@ -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();