src/Platform/SecurityBundle/Form/Type/ResetPasswordRequestType.php line 16

Open in your IDE?
  1. <?php
  2. namespace Platform\SecurityBundle\Form\Type;
  3. use EWZ\Bundle\RecaptchaBundle\Form\Type\EWZRecaptchaV3Type;
  4. use EWZ\Bundle\RecaptchaBundle\Validator\Constraints\IsTrueV3;
  5. use Symfony\Component\Form\AbstractType;
  6. use Symfony\Component\Form\Extension\Core\Type\EmailType;
  7. use Symfony\Component\Form\FormBuilderInterface;
  8. use Symfony\Component\Validator\Constraints\NotBlank;
  9. /**
  10.  * Class ResetPasswordRequestType
  11.  * @package Platform\SecurityBundle\Form\Type
  12.  */
  13. final class ResetPasswordRequestType extends AbstractType
  14. {
  15.     /**
  16.      * {@inheritdoc}
  17.      */
  18.     public function buildForm(FormBuilderInterface $builder, array $options)
  19.     {
  20.         $builder
  21.             ->add('email'EmailType::class, array(
  22.                 'label' => 'Email',
  23.                 'constraints' => array(
  24.                     new NotBlank(),
  25.                 ),
  26.             ))
  27.             ->add('recaptcha'EWZRecaptchaV3Type::class, array(
  28.                 'mapped' => false,
  29.                 'constraints' => array(
  30.                     new IsTrueV3(),
  31.                 ),
  32.             ))
  33.         ;
  34.     }
  35. }