<?php
namespace AdminBundle\Form\Type\Vehicle;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
use Symfony\Component\OptionsResolver\OptionsResolver;
class TableMainCharacteristicsType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder->add('title_1', TextType::class, [
'label' => 'Значение 1',
'attr' => [
'maxlength' => 16,
'class' => 'col-md-3'
],
'required' => false,
])
->add('title_2', TextType::class, [
'label' => 'Значение 2',
'attr' => [
'maxlength' => 16,
'class' => 'col-md-3'
],
'required' => false,
])
->add('title_3', TextType::class, [
'label' => 'Значение 3',
'attr' => [
'maxlength' => 16,
'class' => ' col-md-3'
],
'required' => false,
])
->add('title_4', TextType::class, [
'label' => 'Значение 4',
'attr' => [
'maxlength' => 16,
'class' => 'col-md-3'
],
'required' => false,
])
->add('description_1', TextareaType::class, [
'label' => 'Описание 1',
'attr' => [
'maxlength' => 205,
'class' => 'col-md-3'
],
'required' => false,
])
->add('description_2', TextareaType::class, [
'label' => 'Описание 2',
'attr' => [
'maxlength' => 205,
'class' => 'col-md-3'
],
'required' => false,
])
->add('description_3', TextareaType::class, [
'label' => 'Описание 3',
'attr' => [
'maxlength' => 205,
'class' => 'col-md-3'
],
'required' => false,
])
->add('description_4', TextareaType::class, [
'label' => 'Описание 4',
'attr' => [
'maxlength' => 205 ,
'class' => 'col-md-3'
],
'required' => false,
]);
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => null,
'compound' => true,
]);
}
}