35 lines
970 B
PHP
35 lines
970 B
PHP
<?php
|
|
|
|
namespace CoursEndingBundle\Form\Type;
|
|
|
|
use Symfony\Component\Form\FormBuilderInterface;
|
|
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
|
|
use Propel\Bundle\PropelBundle\Form\BaseAbstractType;
|
|
use CoursEndingBundle\Form\Type\FormsType;
|
|
use Propel\Bundle\PropelBundle\Form\Type\ModelType;
|
|
use CoursEndingBundle\Model\Form;
|
|
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
|
|
use CoursEndingBundle\Form\Type\FormType;
|
|
|
|
class FormsType extends BaseAbstractType
|
|
{
|
|
protected $options = array(
|
|
'name' => 'forms',
|
|
'allow_extra_fields' => true,
|
|
'csrf_protection' => false,
|
|
);
|
|
|
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
|
{
|
|
$builder->add(
|
|
'forms',
|
|
CollectionType::class,
|
|
[
|
|
'entry_type' => FormType::class,
|
|
'allow_add' => true,
|
|
'by_reference' => false,
|
|
]
|
|
);
|
|
}
|
|
}
|