Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. <?php
  2.  
  3. namespace App\Form\Security;
  4.  
  5. use Symfony\Component\Form\AbstractType;
  6. use Symfony\Component\Form\Extension\Core\Type\PasswordType;
  7. use Symfony\Component\Form\Extension\Core\Type\SubmitType;
  8. use Symfony\Component\Form\Extension\Core\Type\TextType;
  9. use Symfony\Component\Form\FormBuilderInterface;
  10.  
  11. class LoginType extends AbstractType
  12. {
  13. /**
  14. * @param FormBuilderInterface $builder
  15. * @param array $options
  16. */
  17. public function buildForm(FormBuilderInterface $builder, array $options): void
  18. {
  19. $builder
  20. ->add('_username', TextType::class, [
  21. 'attr' => [
  22. 'placeholder' => 'form.user.email',
  23. ],
  24. ])
  25. ->add('_password', PasswordType::class, [
  26. 'attr' => [
  27. 'placeholder' => 'form.user.password',
  28. ],
  29. ])
  30. ->add('submit', SubmitType::class, [
  31. 'label' => 'form.action.login',
  32. ])
  33. ;
  34. }
  35.  
  36. /**
  37. * @return string
  38. */
  39. public function getBlockPrefix(): ?string
  40. {
  41. return '';
  42. }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement