I have a page with a view on it and some exposed inputs. I need to get the results programatically. I can load a view programmatically no problem but setting the exposed input has not been working.
$view = Views::getView('inventory_listing');
$view->initDisplay();
$view->setExposedInput($view->getExposedInput());
$view->preExecute();
$view->execute();
results in ALL the rows, not the ones filtered out. I am running this in my hook_form_alter function because I need to change the display of my exposed filters. That may be part of the problem. Any ideas?