diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-02-23 20:56:09 +0100 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-02-23 20:56:09 +0100 |
commit | 0e7971d8354b0923d2e8f38690b9fe46e695dd93 (patch) | |
tree | 7026acde83f5d38a9ad94d92f926d880aa233dbe /src/Wallabag/CoreBundle/Form/Type/UserType.php | |
parent | 2f6a596760c62efd9e43602f787fa44400d522b3 (diff) | |
parent | c641baad0ec52198d77f2018c7bf8acdfe5957ce (diff) | |
download | wallabag-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/UserType.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Form/Type/UserType.php | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Form/Type/UserType.php b/src/Wallabag/CoreBundle/Form/Type/UserType.php new file mode 100644 index 00000000..b479a0b5 --- /dev/null +++ b/src/Wallabag/CoreBundle/Form/Type/UserType.php | |||
@@ -0,0 +1,31 @@ | |||
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 UserType extends AbstractType | ||
9 | { | ||
10 | public function buildForm(FormBuilderInterface $builder, array $options) | ||
11 | { | ||
12 | $builder | ||
13 | ->add('username', 'text') | ||
14 | ->add('name', 'text') | ||
15 | ->add('email', 'text') | ||
16 | ->add('save', 'submit') | ||
17 | ; | ||
18 | } | ||
19 | |||
20 | public function setDefaultOptions(OptionsResolverInterface $resolver) | ||
21 | { | ||
22 | $resolver->setDefaults(array( | ||
23 | 'data_class' => 'Wallabag\CoreBundle\Entity\User', | ||
24 | )); | ||
25 | } | ||
26 | |||
27 | public function getName() | ||
28 | { | ||
29 | return 'user'; | ||
30 | } | ||
31 | } | ||