InputFilter factory



How is supposed to be created a InputFilter instance ?

Within the filters I have a RecordExists (with custom Select) and I need to pass the coresponding TableGateway/dbAdapter.

Currently to pass to controller the input filter I am getting the inputfilter from Service Manager in Controller Factory like this:

$shelfInputFilter = $container->get(InputFilterPluginManager::class)->get(ShelfInputFilter::class);

But of course, I need to pass the table gateway/dbAdapter to the input filter…