add( 'label', TextType::class, [ 'label' => 'Libellé', 'required' => true, 'attr' => [ ], 'constraints' => [ new NotBlank(), ], ] ); $builder->add( 'status', ChoiceType::class, [ 'label' => 'Statut', 'required' => true, 'choices' => [ 'Brouillon' => Project::DRAFT, 'Publié' => Project::PUBLISHED, ], 'attr' => [ ], 'constraints' => [ new NotBlank(), ], ] ); $builder->add( 'description', SimpleMdTextareaType::class, [ 'label' => 'Contenu', 'required' => false, 'constraints' => [ ], ] ); $builder->add( 'links', CollectionType::class, [ 'label' => 'Liens', 'entry_type' => ProjectLinkType::class, 'by_reference' => false, 'allow_add' => true, 'allow_delete' => true, 'prototype' => true, ] ); } public function configureOptions(OptionsResolver $resolver): void { $resolver->setDefaults([ 'data_class' => Project::class, ]); } }