<?php
namespace Aqarmap\Bundle\DiscussionBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class CommentType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('content', TextareaType::class, [
'attr' => ['class' => 'discussion-textarea'],
'required' => true,
'label' => 'neighborhoods.comment.your_comment',
])
;
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => 'Aqarmap\Bundle\DiscussionBundle\Entity\Comment',
]);
}
}