'How can I put 3 different Entities in one choiceType with symfony

in my project symfony, i have 3 entity businessClient , particularClient and company. i want to make a form and in this form i want to make a choicetype that include my businessClient objects and my particularClient objects and companies object, so i want to know how i can make that.

i tried this:

$builder->add('dest',EntityType::class,['class' => BusinessClient::class,'class' => ParticularClient::class,
            ]);

but it does not work !



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source