vendor/ibexa/user/src/lib/Form/Type/UserPasswordForgotType.php line 18

Open in your IDE?
  1. <?php
  2. /**
  3.  * @copyright Copyright (C) Ibexa AS. All rights reserved.
  4.  * @license For full copyright and license information view LICENSE file distributed with this source code.
  5.  */
  6. declare(strict_types=1);
  7. namespace Ibexa\User\Form\Type;
  8. use Ibexa\User\Form\Data\UserPasswordForgotData;
  9. use Symfony\Component\Form\AbstractType;
  10. use Symfony\Component\Form\Extension\Core\Type\EmailType;
  11. use Symfony\Component\Form\Extension\Core\Type\SubmitType;
  12. use Symfony\Component\Form\FormBuilderInterface;
  13. use Symfony\Component\OptionsResolver\OptionsResolver;
  14. class UserPasswordForgotType extends AbstractType
  15. {
  16.     public function buildForm(FormBuilderInterface $builder, array $options)
  17.     {
  18.         $builder
  19.             ->add('email'EmailType::class, [
  20.                 'required' => true,
  21.                 'label' => /** @Desc("Enter your email") */ 'ezplatform.forgot_user_password.email',
  22.             ])
  23.             ->add(
  24.                 'reset',
  25.                 SubmitType::class,
  26.                 ['label' => /** @Desc("Send") */ 'ezplatform.forgot_user_password.send']
  27.             );
  28.     }
  29.     public function configureOptions(OptionsResolver $resolver)
  30.     {
  31.         $resolver->setDefaults([
  32.             'data_class' => UserPasswordForgotData::class,
  33.             'translation_domain' => 'forms',
  34.         ]);
  35.     }
  36. }
  37. class_alias(UserPasswordForgotType::class, 'EzSystems\EzPlatformUser\Form\Type\UserPasswordForgotType');