However this example would not work by itself, as it does not implement AbstractFilter nor FilterInterface. A more complete example together with an example of the annotation such as
#[ApiFilter(CustomGeoDistanceFilter::class, properties: ['locations.point' => 'geo_distance'])]
class SearchOffer
{
}
Hi, I was trying to create a custom filter for geo-distance query.
I had a very hard time understanding what to do - this section is documented rather poorly.
I ended up doing something like this:
I had a hard time understanding some of these concepts:
apply
method if it never gets called on runtime - some sort of a BC/adapter thing?what is a reasonable code example of a custom filter? The docs only show an example of an extension:
However this example would not work by itself, as it does not implement
AbstractFilter
norFilterInterface
. A more complete example together with an example of the annotation such aswould be very appreciated.
Thanks