Promote usage of ModifierPoolDataProvider instead of AbstractDataProvider in DataSource component topic
General issue
Use \Magento\Ui\DataProvider\ModifierPoolDataProvider instead of \Magento\Ui\DataProvider\AbstractDataProvider
https://devdocs.magento.com/guides/v2.2/ui_comp_guide/concepts/ui_comp_data_source.html
Description:
While researching how should I create custom data provider first place where google points is this page. In the Declaring the XML paragraph the doc mentions that \Magento\Ui\DataProvider\AbstractDataProvider coulde be used to satisfy all of the requirements. Next topic in concepts is About PHP modifiers in UI components which talks about modifiers and how to use them. For illustration \Magento\Catalog\Ui\DataProvider\Product\Form\ProductDataProvider is provided.
Why doesn't official doc promote usage of \Magento\Ui\DataProvider\ModifierPoolDataProvider and why doesn't ProductDataProvider inherit from ModifierPoolDataProvider? Quick search reveals that most of the modules in magento 2 default install are inheriting AbstractDataProvider making them harder to use for 3rd party modules. Since ModifierPoolDataProvider already inherits AbstractDataProvider this change should not break anything.
Possible solutions:
Promote usage of ModifierPoolDataProvider instead of AbstractDataProvider. Also change standard modules to use ModifierPoolDataProvider
Hi @Pisikoll. Thank you for your report. To help us process this issue please make sure that you provided sufficient information.
Please, add a comment to assign the issue: @magento I am working on this
- Join Magento Community Engineering Slack and ask your questions in #github channel.
@magento I am working on this