Created
March 15, 2019 13:44
-
-
Save r8or0pz/e10e7894e9f7e70468610154ef08b76c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Form; | |
use App\Entity\VehicleRegisteredType; | |
use Symfony\Component\Form\AbstractType; | |
use Symfony\Component\Form\FormBuilderInterface; | |
use Symfony\Component\OptionsResolver\OptionsResolver; | |
use Symfony\Bridge\Doctrine\Form\Type\EntityType; | |
class VehicleRegisteredTypeTypeMap extends AbstractType | |
{ | |
public function buildForm(FormBuilderInterface $builder, array $options) | |
{ | |
$builder | |
->add('map', EntityType::class, [ | |
'class' => VehicleRegisteredType::class, | |
'multiple' => true, | |
]) | |
; | |
} | |
public function configureOptions(OptionsResolver $resolver) | |
{ | |
$resolver->setDefaults( | |
[ | |
'data_class' => VehicleRegisteredType::class, | |
'allow_extra_fields' => true, | |
'csrf_protection' => false, | |
] | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment