<?php


namespace AutoAdmin\Bundle\BrickBuilder\Form;


use AutoAdmin\Bundle\BrickBuilder\Model\Api\BrickSort;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\IntegerType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

class BrickSortType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder->add('brickId', IntegerType::class);
        $builder->add('parentBrickId', IntegerType::class);
        $builder->add('eventType', TextType::class);
        $builder->add('index', IntegerType::class);
    }

    public function configureOptions(OptionsResolver $resolver)
    {
        $resolver->setDefaults(
            [
                'data_class' => BrickSort::class,
                'csrf_protection' => false,
            ]
        );
    }
}