for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Ivoaz ContentEditable bundle.
*
* (c) Ivo Azirjans <[email protected]>
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Ivoaz\Bundle\ContentEditableBundle\Form\Type;
use Ivoaz\Bundle\ContentEditableBundle\Form\Model\Batch;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
/**
* @author Ivo Azirjans <[email protected]>
class BatchType extends AbstractType
{
* {@inheritdoc}
public function buildForm(FormBuilderInterface $builder, array $options)
$builder->add(
'contents',
CollectionType::class,
['entry_type' => BatchContentType::class, 'allow_add' => true, 'allow_delete' => true]
);
}
public function configureOptions(OptionsResolver $resolver)
$resolver->setDefaults(
[
'data_class' => Batch::class,
'csrf_protection' => false,
'method' => 'POST',
]
public function getBlockPrefix()
return '';