<?php
declare(strict_types=1);
namespace App\Form;
use App\Entity\Newsletter;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class NewsLetterType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add(
'email',
EmailType::class,
[
'attr' => [
'placeholder' => '* E-Mail Adress',
'title' => 'E-Mail Adress',
],
]
)
;
}
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults([
'data_class' => Newsletter::class,
]);
}
}