EasyAdminBundle icon indicating copy to clipboard operation
EasyAdminBundle copied to clipboard

setFilters / addFilters on AdminUrlGenerator

Open tpformybh opened this issue 5 years ago • 3 comments

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

tpformybh avatar Jan 15 '21 23:01 tpformybh

👍

patrickmatsumura avatar Jul 16 '21 10:07 patrickmatsumura

Open for a PR?

OskarStark avatar Jul 17 '21 06:07 OskarStark

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' => '!=']])

meiyasan avatar Jun 01 '22 13:06 meiyasan