src/Cms/ContainerBundle/Form/Type/Container/GenericContainerType.php line 13

Open in your IDE?
  1. <?php
  2. namespace Cms\ContainerBundle\Form\Type\Container;
  3. use Cms\CoreBundle\Form\Type\SwitchType;
  4. use Symfony\Component\Form\Extension\Core\Type\TextType;
  5. use Symfony\Component\Form\FormBuilderInterface;
  6. /**
  7.  * Class GenericContainerType
  8.  * @package Cms\ContainerBundle\Form\Type\Container
  9.  */
  10. final class GenericContainerType extends AbstractContainerType
  11. {
  12.     /**
  13.      * {@inheritdoc}
  14.      */
  15.     public function buildForm(FormBuilderInterface $builder, array $options)
  16.     {
  17.         parent::buildForm($builder$options);
  18.         $builder
  19.             ->add('preferred'SwitchType::class, array(
  20.                 'categoryName' => 'General',
  21.                 'required' => false,
  22.             ))
  23.             ->add('code'TextType::class, array(
  24.                 'categoryName' => 'General',
  25.                 'required' => false,
  26.             ))
  27.         ;
  28.     }
  29. }