1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
| public function buildForm(FormBuilderInterface $builder, array $options) {
$builder
->add('numeroLeads', TextType::class)
->add('dateCreate', DateTimeType::class, array(
// render as a single text box
'widget' => 'single_text',
'html5' => false,
'format' => 'dd/MM/yyyy',
))
//->add('canal', TextType::class)
//->add('offre', TextType::class)
//->add('statutId', StatutLeadsType::class)
->add('statutId', EntityType::class, array(
'class' => 'BackBundle:StatutLeads',
'query_builder' => function (StatutLeadsRepository $er) {
return $er->createQueryBuilder('st')
->orderBy('st.statut', 'ASC');
},
'choice_label' => 'statut',
))
->add('apporteurId', ApporteurType::class)
->add('contacts', CollectionType::class, array(
'entry_type' => ClientType::class,
'allow_add' => true,
'allow_delete' => true,
'prototype' => true,
'by_reference' => false,
'attr' => array(
'class' => 'contacts-list',
),
)
)
->add('contrats', CollectionType::class, array(
'entry_type' => ContratType::class,
'allow_add' => true,
'allow_delete' => true,
'prototype' => true,
'by_reference' => false,
'attr' => array(
'class' => 'contrats-list',
),
)
)
->add('leadsApporteurAssociations', CollectionType::class, array(
'entry_type' => CommentaireLeadsType::class,
'allow_add' => true,
'allow_delete' => true,
'prototype' => true,
'by_reference' => false,
'attr' => array(
'class' => 'commentaires-list',
),
)
)
->add('leadsActionsAssociations', CollectionType::class, array(
'entry_type' => ActionsType::class,
'allow_add' => true,
'allow_delete' => true,
'prototype' => true,
'by_reference' => false,
'attr' => array(
'class' => 'actions-list',
),
)
)
;
} |
Partager