]> git.immae.eu Git - github/wallabag/wallabag.git/blame - src/Wallabag/CoreBundle/Form/Type/ConfigType.php
Implement simple config
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Form / Type / ConfigType.php
CommitLineData
4d85d7e9
J
1<?php
2namespace Wallabag\CoreBundle\Form\Type;
3
4use Symfony\Component\Form\AbstractType;
5use Symfony\Component\Form\FormBuilderInterface;
6use Symfony\Component\OptionsResolver\OptionsResolverInterface;
7
8class 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 ))
24 ->add('items_per_page')
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}