magnetico-web/src/Form/LoginType.php

26 lines
718 B
PHP
Raw Normal View History

2018-06-25 01:02:27 +00:00
<?php
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
{
public function buildForm(FormBuilderInterface $builder, array $options): void
2018-06-25 01:02:27 +00:00
{
$builder
->add('_username', TextType::class, ['mapped' => false, 'required' => true])
->add('_password', PasswordType::class, ['mapped' => false, 'required' => true])
2018-06-25 01:02:27 +00:00
;
}
public function getBlockPrefix(): string
2018-06-25 01:02:27 +00:00
{
// Empty prefix for default UsernamePasswordFormAuthenticationListener
2018-06-25 01:02:27 +00:00
return '';
}
}