aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-04-01 21:58:08 +0200
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-04-01 21:58:08 +0200
commite3c34bfc06f3ea266a418d6246560f15d3f73e2a (patch)
tree6c6465b6e936b0d38d0d3fdc489fb9e576a5e09c /src/Wallabag/CoreBundle/Form/Type/UserInformationType.php
parentd6fa2f70ac3c798b28ce33c6c143f45c09c74062 (diff)
parentc844dc0c50bb4f1044154401310af25eb21b0f11 (diff)
downloadwallabag-e3c34bfc06f3ea266a418d6246560f15d3f73e2a.tar.gz
wallabag-e3c34bfc06f3ea266a418d6246560f15d3f73e2a.tar.zst
wallabag-e3c34bfc06f3ea266a418d6246560f15d3f73e2a.zip
Merge pull request #1164 from wallabag/v2-remove-username-in-config
Remove ability to change username
Diffstat (limited to 'src/Wallabag/CoreBundle/Form/Type/UserInformationType.php')
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/UserInformationType.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php b/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php
new file mode 100644
index 00000000..617722db
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php
@@ -0,0 +1,30 @@
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 UserInformationType extends AbstractType
9{
10 public function buildForm(FormBuilderInterface $builder, array $options)
11 {
12 $builder
13 ->add('name', 'text')
14 ->add('email', 'text')
15 ->add('save', 'submit')
16 ;
17 }
18
19 public function setDefaultOptions(OptionsResolverInterface $resolver)
20 {
21 $resolver->setDefaults(array(
22 'data_class' => 'Wallabag\CoreBundle\Entity\User',
23 ));
24 }
25
26 public function getName()
27 {
28 return 'update_user';
29 }
30}