]>
Commit | Line | Data |
---|---|---|
4d85d7e9 J |
1 | <?php |
2 | namespace Wallabag\CoreBundle\Form\Type; | |
3 | ||
4 | use Symfony\Component\Form\AbstractType; | |
5 | use Symfony\Component\Form\FormBuilderInterface; | |
6 | use Symfony\Component\OptionsResolver\OptionsResolverInterface; | |
7 | ||
8 | class ConfigType extends AbstractType | |
9 | { | |
10 | public function buildForm(FormBuilderInterface $builder, array $options) | |
11 | { | |
12 | $builder | |
13 | ->add('theme', 'choice', array( | |
14 | 'choices' => array( | |
15 | 'baggy' => 'Baggy', | |
16 | 'courgette' => 'Courgette', | |
17 | 'dark' => 'Dark', | |
18 | 'default' => 'Default', | |
19 | 'dmagenta' => 'Dmagenta', | |
20 | 'solarized' => 'Solarized', | |
21 | 'solarized_dark' => 'Solarized Dark', | |
22 | ), | |
23 | )) | |
c0d9eba0 | 24 | ->add('items_per_page', 'text') |
4d85d7e9 J |
25 | ->add('language') |
26 | ->add('save', 'submit') | |
27 | ; | |
28 | } | |
29 | ||
30 | public function setDefaultOptions(OptionsResolverInterface $resolver) | |
31 | { | |
32 | $resolver->setDefaults(array( | |
33 | 'data_class' => 'Wallabag\CoreBundle\Entity\Config', | |
34 | )); | |
35 | } | |
36 | ||
37 | public function getName() | |
38 | { | |
39 | return 'config'; | |
40 | } | |
41 | } |