diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Form/Type/ConfigType.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Form/Type/ConfigType.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/Wallabag/CoreBundle/Form/Type/ConfigType.php b/src/Wallabag/CoreBundle/Form/Type/ConfigType.php index 1f0ad89d..88082a04 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,15 @@ 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' => $this->languages, |
38 | )) | 40 | )) |
39 | ->add('save', 'submit') | 41 | ->add('save', SubmitType::class) |
40 | ; | 42 | ; |
41 | } | 43 | } |
42 | 44 | ||
@@ -47,7 +49,7 @@ class ConfigType extends AbstractType | |||
47 | )); | 49 | )); |
48 | } | 50 | } |
49 | 51 | ||
50 | public function getName() | 52 | public function getBlockPrefix() |
51 | { | 53 | { |
52 | return 'config'; | 54 | return 'config'; |
53 | } | 55 | } |