src/PHPDish/Bundle/UserBundle/Form/Type/ChangeUserProfileType.php
public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $supportLocales = $this->localeManager->all();
        $builder
            ->add('username', TextType::class, [
                'label' => 'form.user.username',
            ])
            ->add('gender', ChoiceType::class, [
                'choices' => [
                     'form.user.gender.male' => User::GENDER_MEN,
                     'form.user.gender.female' => User::GENDER_WOMEN,
                ],
                'placeholder' => 'form.user.gender.placeholder',
                'label' => 'form.user.gender.gender',
            ])
            ->add('email', TextType::class, [
                'label' => 'form.user.email',
            ])
            ->add('description', TextareaType::class, [
                'label' => 'form.user.description',
            ])
            ->add('profile', ProfileType::class)
            ->add('avatar', HiddenType::class, [
                'label' => 'form.user.avatar',
            ])
            ->add('locale', ChoiceType::class, [
                'choices' => $this->wrapLocaleChoices(),
                'label' => 'form.user.locale.locale',
            ]);
    }
public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $supportLocales = $this->localeManager->all();
        $builder
            ->add('username', TextType::class, [
                'label' => 'form.user.username',
            ])
            ->add('gender', ChoiceType::class, [
                'choices' => [
                     'form.user.gender.male' => User::GENDER_MEN,
                     'form.user.gender.female' => User::GENDER_WOMEN,
                ],
                'placeholder' => 'form.user.gender.placeholder',
                'label' => 'form.user.gender.gender',
            ])
            ->add('email', TextType::class, [
                'label' => 'form.user.email',
            ])
            ->add('description', TextareaType::class, [
                'label' => 'form.user.description',
            ])
            ->add('profile', ProfileType::class)
            ->add('avatar', HiddenType::class, [
                'label' => 'form.user.avatar',
            ])
            ->add('locale', ChoiceType::class, [
                'choices' => $this->wrapLocaleChoices(),
                'label' => 'form.user.locale.locale',
            ]);
    }
{@inheritdoc}