aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Form/Type/UserType.php
diff options
context:
space:
mode:
authorJeremy <jeremy.benoist@gmail.com>2015-02-17 22:45:20 +0100
committerJeremy <jeremy.benoist@gmail.com>2015-02-17 22:45:20 +0100
commitc0d9eba07f40a52bdfcfca3e7a926163b17d83ab (patch)
treeb80e1e1a4dc51519b28ea995e411231d35135763 /src/Wallabag/CoreBundle/Form/Type/UserType.php
parentd9085c63e35bb708f560722fff5f4f5ad322c27b (diff)
downloadwallabag-c0d9eba07f40a52bdfcfca3e7a926163b17d83ab.tar.gz
wallabag-c0d9eba07f40a52bdfcfca3e7a926163b17d83ab.tar.zst
wallabag-c0d9eba07f40a52bdfcfca3e7a926163b17d83ab.zip
Updating logged in user (email, name, etc ..)
Diffstat (limited to 'src/Wallabag/CoreBundle/Form/Type/UserType.php')
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/UserType.php31
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
2namespace Wallabag\CoreBundle\Form\Type;
3
4use Symfony\Component\Form\AbstractType;
5use Symfony\Component\Form\FormBuilderInterface;
6use Symfony\Component\OptionsResolver\OptionsResolverInterface;
7
8class 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}