Arkounay / QuickAdminGeneratorBundle

QAG - Quick Admin Generator Bundle for Symfony >= 5, a bundle that generates cruds admin for Symfony applications using Doctrine
https://arkounay.github.io/QuickAdminGeneratorBundle/
MIT License
24 stars 2 forks source link

Entity Filter with multiple option #22

Open npotier opened 2 days ago

npotier commented 2 days ago

Hello, and thank you for this bundle.

it would be super cool to have the ability to filter on multiple entities.

I think minor changes should allow to do so :

in Model/Form/Filter/Type/EntityFilterType.php

➡️ use the option parameter to allow multiple => true

in Model/Form/Filter/EntityFilter.php

➡️ check if multiple values are selected (if (count($form->get($index)->getData()['entity']) > 1) to switch from where xx = yy to where xx IN (yy,zz)

I have already done that in my project. What do you think about a PR on this ?

Arkounay commented 2 days ago

Hi, thanks for the suggestion, sounds like a good idea, a PR would be appreciated if you can :+1: Thanks