src/Form/PlaceExpertContactType.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Form;
  3. use App\Entity\NotifPodcast;
  4. use Symfony\Component\Form\AbstractType;
  5. use Symfony\Component\Form\Extension\Core\Type\EmailType;
  6. use Symfony\Component\Form\Extension\Core\Type\TextType;
  7. use Symfony\Component\Form\FormBuilderInterface;
  8. use Symfony\Component\OptionsResolver\OptionsResolver;
  9. class PlaceExpertContactType extends AbstractType
  10. {
  11.     public function buildForm(FormBuilderInterface $builder, array $options): void
  12.     {
  13.         $builder
  14.             ->add('name'TextType::class, [
  15.                 'label' => false,
  16.                 'attr' => [
  17.                     'placeholder' => 'PrĂ©nom'
  18.                 ]
  19.             ])
  20.             ->add('email'EmailType::class, [
  21.                 'label' => false,
  22.                 'attr' => [
  23.                     'placeholder' => 'Email'
  24.                 ]
  25.             ])
  26.         ;
  27.     }
  28.     public function configureOptions(OptionsResolver $resolver): void
  29.     {
  30.         $resolver->setDefaults([
  31.             'data_class' => NotifPodcast::class,
  32.         ]);
  33.     }
  34. }