Created
November 21, 2017 12:02
-
-
Save ollo-ride-nico/6430daa8f52e6f79d9f301794a8c587c to your computer and use it in GitHub Desktop.
TrickAddType.php
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
class TricksAddType extends AbstractType | |
{ | |
public function buildForm(FormBuilderInterface $builder, array $options) | |
{ | |
// On affiche les champs du builder | |
$builder | |
->add('nom', TextType::class) | |
->add('description', TextareaType::class) | |
->add('groupe', CollectionType::class, array( | |
'entry_type' => GroupeAddType::class, | |
'allow_add' => true, | |
'allow_delete' => true | |
)) | |
->add('save', SubmitType::class); | |
} | |
public function configureOptions(OptionsResolver $resolver) | |
{ | |
$resolver->setDefaults(array( | |
'data_class' => Tricks::class, | |
)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment