]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/GroupBundle/Form/GroupType.php
First draft to manage relation between User and Group
[github/wallabag/wallabag.git] / src / Wallabag / GroupBundle / Form / GroupType.php
index c2ad764bc2f39df7306b3005c115a07b5d02fbab..749c15e9090559a27e4ed3b3dcb87412876ec1c6 100644 (file)
@@ -2,6 +2,7 @@
 
 namespace Wallabag\GroupBundle\Form;
 
+use Symfony\Bridge\Doctrine\Form\Type\EntityType;
 use Symfony\Component\Form\AbstractType;
 use Symfony\Component\Form\FormBuilderInterface;
 use Symfony\Component\OptionsResolver\OptionsResolver;
@@ -21,6 +22,12 @@ class GroupType extends AbstractType
                 'required' => false,
                 'label' => 'group.form.name_label',
             ])
+            ->add('users', EntityType::class, array(
+                'class' => 'WallabagUserBundle:User',
+                'choice_label' => 'username',
+                'multiple' => true,
+                'expanded' => true,
+            ))
             ->add('save', SubmitType::class, [
                 'label' => 'group.form.save',
             ])