mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-14 14:24:24 +00:00
Refactoring CustomFields/CustomFieldChoice.php : indentation
This commit is contained in:
parent
4abb994725
commit
23438926b1
@ -69,8 +69,7 @@ class CustomFieldChoice implements CustomFieldInterface
|
||||
RequestStack $requestStack,
|
||||
Translator $translator,
|
||||
TwigEngine $templating,
|
||||
TranslatableStringHelper $translatableStringHelper
|
||||
)
|
||||
TranslatableStringHelper $translatableStringHelper)
|
||||
{
|
||||
$this->requestStack = $requestStack;
|
||||
$this->defaultLocales = $translator->getFallbackLocales();
|
||||
@ -96,8 +95,7 @@ class CustomFieldChoice implements CustomFieldInterface
|
||||
'multiple' => $customFieldOptions[self::MULTIPLE],
|
||||
'choices' => $choices,
|
||||
'required' => false,
|
||||
'label' => $this->translatableStringHelper->localize($customField->getName())
|
||||
);
|
||||
'label' => $this->translatableStringHelper->localize($customField->getName()));
|
||||
|
||||
//if allow_other = true
|
||||
if ($customFieldOptions[self::ALLOW_OTHER] == true) {
|
||||
@ -131,13 +129,13 @@ class CustomFieldChoice implements CustomFieldInterface
|
||||
|
||||
public function buildOptionsForm(FormBuilderInterface $builder)
|
||||
{
|
||||
$builder->add(self::MULTIPLE, 'choice', array(
|
||||
$builder
|
||||
->add(self::MULTIPLE, 'choice', array(
|
||||
'expanded' => true,
|
||||
'multiple' => false,
|
||||
'choices' => array(
|
||||
1 => 'Multiple',
|
||||
0 => 'Unique'
|
||||
),
|
||||
0 => 'Unique'),
|
||||
'empty_data' => 0
|
||||
))
|
||||
->add(self::EXPANDED, 'choice', array(
|
||||
@ -145,16 +143,14 @@ class CustomFieldChoice implements CustomFieldInterface
|
||||
'multiple' => false,
|
||||
'choices' => array(
|
||||
1 => 'Expanded',
|
||||
0 => 'Non expanded'
|
||||
),
|
||||
0 => 'Non expanded'),
|
||||
'empty_data' => 0
|
||||
))
|
||||
->add(self::ALLOW_OTHER, 'choice', array(
|
||||
'label' => 'Allow other',
|
||||
'choices' => array(
|
||||
0 => 'No',
|
||||
1 => 'Yes'
|
||||
),
|
||||
1 => 'Yes'),
|
||||
'empty_data' => 0,
|
||||
'expanded' => true,
|
||||
'multiple' => false
|
||||
@ -164,8 +160,7 @@ class CustomFieldChoice implements CustomFieldInterface
|
||||
->add(self::CHOICES, new ChoicesType(), array(
|
||||
'type' => new ChoicesListType($this->defaultLocales),
|
||||
'allow_add' => true
|
||||
))
|
||||
;
|
||||
));
|
||||
|
||||
return $builder;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user