diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-01-15 15:38:31 +0100 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-01-15 15:38:31 +0100 |
commit | 1930c19d8214c05ceefac5ac011a6b6e7e4a983d (patch) | |
tree | 8f07ffa139c7c2e883a560ef7dbb35a76adfb8dd /src/Wallabag/CoreBundle/Form/Type/ConfigType.php | |
parent | 790573d45899504bdecd2573c8f64018e23b139e (diff) | |
parent | 131eaa3e94ace8d75d6218e5c7c3aa58d5bb5009 (diff) | |
download | wallabag-1930c19d8214c05ceefac5ac011a6b6e7e4a983d.tar.gz wallabag-1930c19d8214c05ceefac5ac011a6b6e7e4a983d.tar.zst wallabag-1930c19d8214c05ceefac5ac011a6b6e7e4a983d.zip |
Merge pull request #1524 from wallabag/sf2.8
Upgrade to Symfony 3.0
Diffstat (limited to 'src/Wallabag/CoreBundle/Form/Type/ConfigType.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Form/Type/ConfigType.php | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/Wallabag/CoreBundle/Form/Type/ConfigType.php b/src/Wallabag/CoreBundle/Form/Type/ConfigType.php index 1f0ad89d..a139f2df 100644 --- a/src/Wallabag/CoreBundle/Form/Type/ConfigType.php +++ b/src/Wallabag/CoreBundle/Form/Type/ConfigType.php | |||
@@ -3,6 +3,8 @@ | |||
3 | namespace Wallabag\CoreBundle\Form\Type; | 3 | namespace Wallabag\CoreBundle\Form\Type; |
4 | 4 | ||
5 | use Symfony\Component\Form\AbstractType; | 5 | use Symfony\Component\Form\AbstractType; |
6 | use Symfony\Component\Form\Extension\Core\Type\ChoiceType; | ||
7 | use Symfony\Component\Form\Extension\Core\Type\SubmitType; | ||
6 | use Symfony\Component\Form\FormBuilderInterface; | 8 | use Symfony\Component\Form\FormBuilderInterface; |
7 | use Symfony\Component\OptionsResolver\OptionsResolver; | 9 | use Symfony\Component\OptionsResolver\OptionsResolver; |
8 | 10 | ||
@@ -28,15 +30,16 @@ class ConfigType extends AbstractType | |||
28 | public function buildForm(FormBuilderInterface $builder, array $options) | 30 | public function buildForm(FormBuilderInterface $builder, array $options) |
29 | { | 31 | { |
30 | $builder | 32 | $builder |
31 | ->add('theme', 'choice', array( | 33 | ->add('theme', ChoiceType::class, array( |
32 | 'choices' => array_flip($this->themes), | 34 | 'choices' => array_flip($this->themes), |
33 | 'choices_as_values' => true, | 35 | 'choices_as_values' => true, |
34 | )) | 36 | )) |
35 | ->add('items_per_page') | 37 | ->add('items_per_page') |
36 | ->add('language', 'choice', array( | 38 | ->add('language', ChoiceType::class, array( |
37 | 'choices' => $this->languages, | 39 | 'choices' => array_flip($this->languages), |
40 | 'choices_as_values' => true, | ||
38 | )) | 41 | )) |
39 | ->add('save', 'submit') | 42 | ->add('save', SubmitType::class) |
40 | ; | 43 | ; |
41 | } | 44 | } |
42 | 45 | ||
@@ -47,7 +50,7 @@ class ConfigType extends AbstractType | |||
47 | )); | 50 | )); |
48 | } | 51 | } |
49 | 52 | ||
50 | public function getName() | 53 | public function getBlockPrefix() |
51 | { | 54 | { |
52 | return 'config'; | 55 | return 'config'; |
53 | } | 56 | } |