Hi fellow Magento developers!
I'm currently trying to figure out how to use the FilterPool with classes instead of using it with the etc/di.xml.
It should be possible to use filters in a grid listing without setting up a di.xml virtual provider, however, I can't seem to work out how..
How I understand it now is like this:
You have a class, say
Supplier, and you want it to be the
DataProvider for given listing
supplier_listing.xml, I also want to be able to apply
Filter's to it, therefore i'm going to implement the interface
FilterApplierInterface, which requires me to implement a method called
apply() method requires a
Collection object and a
Filter object, and this is where I get lost, how can I specify which data to apply and what Filter to use? Do I need to call the
apply() method myself or should the Magento framework do this for me? If so, how can I tell Magento which Collection to use and what Filter to apply?
Any help would be appreciated, as I'm at a loss right now..
On a side note, i've used the di.xml virtual providers, however, I want to learn more about how Magento does it and how to do it yourself without the virtuals. Any help would be greatly appreciated!