vendor/sylius/sylius/src/Sylius/Bundle/UiBundle/Form/Type/SecurityLoginType.php line 22

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the Sylius package.
  4.  *
  5.  * (c) Paweł Jędrzejewski
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. declare(strict_types=1);
  11. namespace Sylius\Bundle\UiBundle\Form\Type;
  12. use Symfony\Component\Form\AbstractType;
  13. use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
  14. use Symfony\Component\Form\Extension\Core\Type\PasswordType;
  15. use Symfony\Component\Form\Extension\Core\Type\TextType;
  16. use Symfony\Component\Form\FormBuilderInterface;
  17. final class SecurityLoginType extends AbstractType
  18. {
  19.     public function buildForm(FormBuilderInterface $builder, array $options): void
  20.     {
  21.         $builder
  22.             ->add('_username'TextType::class, [
  23.                 'label' => 'sylius.form.login.username',
  24.             ])
  25.             ->add('_password'PasswordType::class, [
  26.                 'label' => 'sylius.form.login.password',
  27.             ])
  28.             ->add('_remember_me'CheckboxType::class, [
  29.                 'label' => 'sylius.form.login.remember_me',
  30.                 'required' => false,
  31.             ])
  32.         ;
  33.     }
  34.     public function getBlockPrefix(): string
  35.     {
  36.         return 'sylius_security_login';
  37.     }
  38. }