This is an architecture example how to create Yii2 a typical page with widgets and a DataProvider.
An action should handle query params, provide a DataProvider and a SerachModel dependent on those params, and return a page.
A typical solition is creating a SearchModel with properties, validation rules and the search()
method
wich should return the DataProviderInterface.
Delegate a DataProvider creating to a factory and provide query params as an argument for the factory method.
Create a model from yii\base\model
to work with filters.