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.     /**
  20.      * {@inheritdoc}
  21.      */
  22.     public function buildForm(FormBuilderInterface $builder, array $options): void
  23.     {
  24.         $builder
  25.             ->add('_username'TextType::class, [
  26.                 'label' => 'sylius.form.login.username',
  27.             ])
  28.             ->add('_password'PasswordType::class, [
  29.                 'label' => 'sylius.form.login.password',
  30.             ])
  31.             ->add('_remember_me'CheckboxType::class, [
  32.                 'label' => 'sylius.form.login.remember_me',
  33.                 'required' => false,
  34.             ])
  35.         ;
  36.     }
  37.     /**
  38.      * {@inheritdoc}
  39.      */
  40.     public function getBlockPrefix(): string
  41.     {
  42.         return 'sylius_security_login';
  43.     }
  44. }