I'd like to check if filters are applied inside an Action
function configured with configureActions()
and, if not, I want to apply a filter (I have already filters classes programmed (with implements FilterInterface
, all ok there).
But I cannot see a way to programmatically apply the filter...
I can obtain all filters with:
$filters = $this->get(FilterFactory::class)->create($context->getCrud()->getFiltersConfig(), $fields, $context->getEntity());
but I don't know what to do with it, and there's no ->applyFilter()
that I can use on any object. Also I don't want to change the URL to apply the filter there because filters are complex queries already programmed in Admin/Filter
and that seems like doing tricks to something that should be more direct, but I can't find the way even then.