src/Form/NewsletterSubscriberType.php line 10
<?php
namespace App\Form;
use App\Entity\NewsletterSubscriber;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class NewsletterSubscriberType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('email')
;
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => NewsletterSubscriber::class,
'csrf_protection' => true,
'csrf_field_name' => '_token',
'csrf_token_id' => 'newsletter-subscriber'
]);
}
}