<?php
namespace Cms\FileBundle\Form\Type;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\Form\FormView;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\OptionsResolver\OptionsResolver;
/**
* Class SpecialFileModalType
*
* @package Cms\FileBundle\Form\Type
*/
final class SpecialFileModalType extends AbstractType
{
/**
* {@inheritdoc}
*/
public function buildView(FormView $view, FormInterface $form, array $options)
{
$view->vars['container'] = $options['container'];
}
/**
* {@inheritdoc}
*/
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setRequired(array(
'container',
));
}
/**
* {@inheritdoc}
* This should be treated as a hidden form type, as its display is rather complex and is handled specially.
*/
public function getParent(): ?string
{
return TextType::class;
}
}