EasyAdminBundle
EasyAdminBundle copied to clipboard
setFilters / addFilters on AdminUrlGenerator
Setting filter values when building a url with the admin generator is clunky
->set('filters', ['seller' => ['value' => $entity->getId(), 'comparison' => '=']])
A function specifically designed to help set the value and operator would be nice, e.g.:
->setFilter('seller', $entity->getId(), '=')
Maybe addFilter would be a better name as multiple filters can be set
👍
Open for a PR?
I have noticed that the command below gives the exact opposite of what it should be (! is not encoded):
->set('filters', ['seller' => ['value' => $entity->getId(), 'comparison' => '!=']])