Assuming I have a custom Magento 2 CRUD/AbstractModel model setup with a
- Model Class
- Resource Model Class
- Resource Model Collection Class
What is the bare minimum ui_component
configuration I need to create a product grid listing?
magento2PHPuicomponentxml
Assuming I have a custom Magento 2 CRUD/AbstractModel model setup with a
What is the bare minimum ui_component
configuration I need to create a product grid listing?
Best Answer
I think you need the listing component with at least the basic arguments
The you need to define the data source in your listing and create the needed types.
di.xml:
And last but not least you have to define the columns.
Still I did not figure out all of it but that seems pretty minimum.
It also seems like the ui_components have already been changed again in the develop branch. First when I tried an example of the develop branch it did not work with 2.0.2. So I think - more to come
===== UPDATE =====
just learned that the DataProvider does nothing with the collection provided in the VirtualType. So you only need the VirtualType for the DataProvider if you want to change its behaviour.
Otherwise you can insert the Frameworks DataProvider directly in the ui-components datasource component and remove the virtual type:
di.xml: