X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FForm%2FType%2FConfigType.php;h=1f0ad89dfad578ffeac5c5067a0748da61dfe3fd;hb=bd0f3d32c9ccb8f7a1409edb960b909a5e6a096d;hp=0fcf020add5ef5495f1a341ba52e03ca3fe17992;hpb=1a93ee423b072ec3bcb0c437cbf9b488bdea245c;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Form/Type/ConfigType.php b/src/Wallabag/CoreBundle/Form/Type/ConfigType.php index 0fcf020a..1f0ad89d 100644 --- a/src/Wallabag/CoreBundle/Form/Type/ConfigType.php +++ b/src/Wallabag/CoreBundle/Form/Type/ConfigType.php @@ -1,36 +1,46 @@ themes = array_combine( $themes, array_map(function ($s) { return ucwords(strtolower(str_replace('-', ' ', $s))); }, $themes) ); + + $this->languages = $languages; } public function buildForm(FormBuilderInterface $builder, array $options) { $builder - ->add('theme', 'choice', array('choices' => $this->themes)) + ->add('theme', 'choice', array( + 'choices' => array_flip($this->themes), + 'choices_as_values' => true, + )) ->add('items_per_page') - ->add('language') + ->add('language', 'choice', array( + 'choices' => $this->languages, + )) ->add('save', 'submit') ; } - public function setDefaultOptions(OptionsResolverInterface $resolver) + public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults(array( 'data_class' => 'Wallabag\CoreBundle\Entity\Config',