<?php
namespace App\Form\Type;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
class CBRCArticleCommentType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('text', TextareaType::class, [
'attr' => ['class' => 'form-control'],
'row_attr' => ['class' => 'form-group'],
'label' => 'Commentaire',
])
->add('create', SubmitType::class, [
'row_attr' => ['class' => 'form-group text-center'],
'label' => 'Commenter',
'attr' => ['class' => 'btn btn-maincolor animate-up-2 text-center'],
])
;
}
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults([
// Configure your form options here
]);
}
}