src/Form/ActivationType.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Form;
  3. use Symfony\Component\Form\AbstractType;
  4. use Symfony\Component\Form\Extension\Core\Type\EmailType;
  5. use Symfony\Component\Form\Extension\Core\Type\TextType;
  6. use Symfony\Component\Form\FormBuilderInterface;
  7. use Symfony\Component\OptionsResolver\OptionsResolver;
  8. class ActivationType extends AbstractType
  9. {
  10.     public function buildForm(FormBuilderInterface $builder, array $options): void
  11.     {
  12.         $builder
  13.             ->add('email'EmailType::class, 
  14.             [
  15.                 'label'             => 'E-mail',
  16.                 'label_attr'        => ['class' => 'with-margin-top-10'],
  17.                 'attr'              => ['class' => 'form-control']
  18.             ])
  19.             ->add('code_activation'TextType::class, 
  20.             [
  21.                 'label'             => 'Code activation',
  22.                 'label_attr'        => ['class' => 'with-margin-top-10'],
  23.                 'attr'              => ['class' => 'form-control']
  24.             ])
  25.         ;
  26.     }
  27.     public function configureOptions(OptionsResolver $resolver): void
  28.     {
  29.         $resolver->setDefaults([
  30.             // Configure your form options here
  31.         ]);
  32.     }
  33. }