aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Form/Type/ConfigType.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-02-23 20:56:09 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-02-23 20:56:09 +0100
commit0e7971d8354b0923d2e8f38690b9fe46e695dd93 (patch)
tree7026acde83f5d38a9ad94d92f926d880aa233dbe /src/Wallabag/CoreBundle/Form/Type/ConfigType.php
parent2f6a596760c62efd9e43602f787fa44400d522b3 (diff)
parentc641baad0ec52198d77f2018c7bf8acdfe5957ce (diff)
downloadwallabag-0e7971d8354b0923d2e8f38690b9fe46e695dd93.tar.gz
wallabag-0e7971d8354b0923d2e8f38690b9fe46e695dd93.tar.zst
wallabag-0e7971d8354b0923d2e8f38690b9fe46e695dd93.zip
Merge pull request #1095 from wallabag/v2-config
V2 config
Diffstat (limited to 'src/Wallabag/CoreBundle/Form/Type/ConfigType.php')
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/ConfigType.php41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Form/Type/ConfigType.php b/src/Wallabag/CoreBundle/Form/Type/ConfigType.php
new file mode 100644
index 00000000..a1e0ce47
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Form/Type/ConfigType.php
@@ -0,0 +1,41 @@
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', 'text')
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}