Skip to content

Commit 0713996

Browse files
author
Leny BERNARD
committed
⬆️ Symfony ~2.8 | ~3.0 and inverse Choices ('choices_as_values')
1 parent 1070332 commit 0713996

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

Form/WidgetButtonType.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,22 @@ public function buildForm(FormBuilderInterface $builder, array $options)
3535
->add('size', ChoiceType::class, [
3636
'label' => 'widget.button.form.label.size',
3737
'choices' => [
38-
'md' => 'widget.button.form.choice.size.normal',
39-
'sm' => 'widget.button.form.choice.size.tiny',
40-
'lg' => 'widget.button.form.choice.size.large',
38+
'widget.button.form.choice.size.normal' => 'md',
39+
'widget.button.form.choice.size.tiny' => 'sm',
40+
'widget.button.form.choice.size.large' => 'lg',
4141
],
4242
'required' => true,
4343
])
4444
->add('style', ChoiceType::class, [
4545
'label' => 'widget.button.form.label.style',
4646
'choices' => [
47-
'default' => 'widget.button.form.choice.style.label.default',
48-
'primary' => 'widget.button.form.choice.style.label.primary',
49-
'success' => 'widget.button.form.choice.style.label.success',
50-
'info' => 'widget.button.form.choice.style.label.info',
51-
'warning' => 'widget.button.form.choice.style.label.warning',
52-
'danger' => 'widget.button.form.choice.style.label.danger',
53-
'link' => 'widget.button.form.choice.style.label.link',
47+
'widget.button.form.choice.style.label.default' => 'default',
48+
'widget.button.form.choice.style.label.primary' => 'primary',
49+
'widget.button.form.choice.style.label.success' => 'success',
50+
'widget.button.form.choice.style.label.info' => 'info',
51+
'widget.button.form.choice.style.label.warning' => 'warning',
52+
'widget.button.form.choice.style.label.danger' => 'danger',
53+
'widget.button.form.choice.style.label.link' => 'link',
5454
],
5555
'required' => true,
5656
])

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
}
1818
],
1919
"require": {
20-
"php": ">=5.3.3",
21-
"symfony/framework-bundle": "~2.3",
20+
"php": ">=5.5.9",
21+
"symfony/framework-bundle": "~2.8|~3.0",
2222
"victoire/victoire": "~1.5"
2323
},
2424
"autoload": {

0 commit comments

Comments
 (0)