aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Form/Type/ConfigType.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/CoreBundle/Form/Type/ConfigType.php')
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/ConfigType.php13
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 @@
3namespace Wallabag\CoreBundle\Form\Type; 3namespace Wallabag\CoreBundle\Form\Type;
4 4
5use Symfony\Component\Form\AbstractType; 5use Symfony\Component\Form\AbstractType;
6use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
7use Symfony\Component\Form\Extension\Core\Type\SubmitType;
6use Symfony\Component\Form\FormBuilderInterface; 8use Symfony\Component\Form\FormBuilderInterface;
7use Symfony\Component\OptionsResolver\OptionsResolver; 9use 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 }