src/Platform/SecurityBundle/Form/Type/LoginType.php line 15

Open in your IDE?
  1. <?php
  2. namespace Platform\SecurityBundle\Form\Type;
  3. use Symfony\Component\Form\AbstractType;
  4. use Symfony\Component\Form\Extension\Core\Type\PasswordType;
  5. use Symfony\Component\Form\Extension\Core\Type\TextType;
  6. use Symfony\Component\Form\FormBuilderInterface;
  7. /**
  8.  * Class LoginType
  9.  *
  10.  * @package Platform\SecurityBundle\Form\Type
  11.  */
  12. class LoginType extends AbstractType
  13. {
  14.     /**
  15.      * {@inheritdoc}
  16.      */
  17.     public function getName()
  18.     {
  19.         return '';
  20.     }
  21.     /**
  22.      * {@inheritdoc}
  23.      */
  24.     public function buildForm(FormBuilderInterface $builder, array $options)
  25.     {
  26.         $builder
  27.             ->add('username'TextType::class, array(
  28.                 'required' => false,
  29.                 'label' => 'Email',
  30.                 'attr' => array(
  31.                     'autocomplete' => 'on',
  32.                 ),
  33.             ))
  34.             ->add('password'PasswordType::class, array(
  35.                 'required' => false,
  36.                 'attr' => array(
  37.                     'autocomplete' => 'on',
  38.                 ),
  39.             ));
  40.     }
  41. }