<?php

namespace CpCreation\VitiCore\Bridge\Symfony\Bundle\Form\Site;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\Form\FormView;
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
 * @author Colinet Julien
 */
class CgvType extends AbstractType
{

    public function configureOptions(OptionsResolver $resolver)
    {
        $resolver->setDefined(['path']);
    }

    public function buildView(FormView $view, FormInterface $form, array $options)
    {
        $view->vars['path'] = $options['path'];
    }

    public function getParent()
    {
        return CheckboxType::class;
    }

    public function getBlockPrefix()
    {
        return 'cgv';
    }
}
