<?php
namespace App\Model\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Validator\Constraints\NotBlank;
/**
* Class ResetPasswordForm.
*/
class ResetPasswordForm extends AbstractType
{
/**
* {@inheritdoc}
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
parent::buildForm($builder, $options);
$builder->add('email', EmailType::class, [
'label' => 'Email',
'required' => true,
'constraints' => [
new NotBlank(['message' => 'Email should not be empty.'])
]
]);
}
/**
* Returns the name of this type.
*
* @return string The name of this type
*/
public function getName()
{
return 'reset_password';
}
}