3 namespace Wallabag\CoreBundle\Form\Type
;
5 use Symfony\Component\Form\AbstractType
;
6 use Symfony\Component\Form\Extension\Core\Type\CheckboxType
;
7 use Symfony\Component\Form\Extension\Core\Type\EmailType
;
8 use Symfony\Component\Form\Extension\Core\Type\SubmitType
;
9 use Symfony\Component\Form\Extension\Core\Type\TextType
;
10 use Symfony\Component\Form\FormBuilderInterface
;
11 use Symfony\Component\OptionsResolver\OptionsResolver
;
13 class UserInformationType
extends AbstractType
15 public function buildForm(FormBuilderInterface
$builder, array $options)
18 ->add('name', TextType
::class, [
19 'label' => 'config.form_user.name_label',
21 ->add('email', EmailType
::class, [
22 'label' => 'config.form_user.email_label',
24 ->add('emailTwoFactor', CheckboxType
::class, [
26 'label' => 'config.form_user.emailTwoFactor_label',
28 ->add('googleTwoFactor', CheckboxType
::class, [
30 'label' => 'config.form_user.googleTwoFactor_label',
33 ->add('save', SubmitType
::class, [
34 'label' => 'config.form.save',
37 ->remove('plainPassword')
41 public function getParent()
43 return 'FOS\UserBundle\Form\Type\RegistrationFormType';
46 public function configureOptions(OptionsResolver
$resolver)
48 $resolver->setDefaults([
49 'data_class' => 'Wallabag\UserBundle\Entity\User',
53 public function getBlockPrefix()