I have a formType, with EntityType column
->add('categorie', EntityType::class,
[
'class' => Category::class,
'choice_label' => 'title',
'expanded' => true,
'multiple' => true,
])
The Category Entity has relation with CategoryType Entity:
CategoryType Table on Database :
ID | TITLE
1 | Sport
2 | policy
Category Table :
ID | TITILE | ID_CATEGORY_TYPE
1 | Soccer | 1
2 | Rugby | 1
3 | USA | 2
4 | Russia | 2
I want to list categories by category type on the form createView() to be like this
Sport
------
[] Soccer //Type Checkbox
[] Rugby
Policy
------
[] USA
[] RUSSIA
is there any method (on the FormType) the modify the display list by adding TITLE of category type on the top?