2018-06-25 01:02:27 +00:00
|
|
|
<?php
|
2022-07-10 13:51:26 +00:00
|
|
|
declare(strict_types=1);
|
2018-06-25 01:02:27 +00:00
|
|
|
|
|
|
|
namespace App\Form;
|
|
|
|
|
|
|
|
use Symfony\Component\Form\AbstractType;
|
|
|
|
use Symfony\Component\Form\Extension\Core\Type\{PasswordType, TextType};
|
|
|
|
use Symfony\Component\Form\FormBuilderInterface;
|
|
|
|
|
|
|
|
class LoginType extends AbstractType
|
|
|
|
{
|
2022-07-20 00:48:19 +00:00
|
|
|
public function buildForm(FormBuilderInterface $builder, array $options): void
|
2018-06-25 01:02:27 +00:00
|
|
|
{
|
|
|
|
$builder
|
2020-01-20 17:12:52 +00:00
|
|
|
->add('_username', TextType::class, ['mapped' => false, 'required' => true])
|
|
|
|
->add('_password', PasswordType::class, ['mapped' => false, 'required' => true])
|
2018-06-25 01:02:27 +00:00
|
|
|
;
|
|
|
|
}
|
|
|
|
|
2022-07-10 13:51:26 +00:00
|
|
|
public function getBlockPrefix(): string
|
2018-06-25 01:02:27 +00:00
|
|
|
{
|
2022-07-10 13:51:26 +00:00
|
|
|
// Empty prefix for default UsernamePasswordFormAuthenticationListener
|
2018-06-25 01:02:27 +00:00
|
|
|
return '';
|
|
|
|
}
|
2020-01-20 17:01:51 +00:00
|
|
|
}
|