<?php
namespace Aqarmap\Bundle\MainBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class FeedbackType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('author')
->add('email', EmailType::class)
->add('message')
->add('referer', HiddenType::class, [
'mapped' => false,
])
;
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => 'Aqarmap\Bundle\MainBundle\Entity\Feedback',
]);
}
public function getBlockPrefix(): string
{
return 'feedback';
}
}