Magento 2具有新的“ uiComponent”功能。这使您可以<uiComponent/>在布局句柄XML文件中包含一个简单标签,以将诸如Grids和Forms之类的内容添加到应用程序页面。  
它显示的是一种用于数据网格(一个结构listing)需要2名集合对象进行配置。  
以下每个配置集合的作用是什么?还是我误解了这些收藏的作用?还是有一种仅使用单个集合创建网格对象的方法?
以下配置设置了一个名为UI的组件列表 cms_page_listing
vendor/magento/module-cms/view/adminhtml/ui_component/cms_page_listing.xml接下来的DI注入告诉Magento a cms_page_listing应该使用一个Magento\Cms\Model\ResourceModel\Page\Grid\Collection集合。
<type name="Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory">
    <arguments>
        <argument name="collections" xsi:type="array">
            <item name="cms_page_listing_data_source" xsi:type="string">Magento\Cms\Model\ResourceModel\Page\Grid\Collection</item>
        </argument>
    </arguments>
</type>这似乎是用于填充网格的主要集合。
但是,这里还有这样PageGridDataProvider的cms_page_listing配置。
<!-- File: vendor/magento/module-cms/view/adminhtml/ui_component/cms_page_listing.xml -->
    <argument name="dataProvider" xsi:type="configurableObject">
        <argument name="class" xsi:type="string">PageGridDataProvider</argument>
        <argument name="name" xsi:type="string">cms_page_listing_data_source</argument>
        <argument name="primaryFieldName" xsi:type="string">page_id</argument>
        <argument name="requestFieldName" xsi:type="string">id</argument>
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="update_url" xsi:type="url" path="mui/index/render"/>
            </item>
        </argument>
    </argument>该PageGridDataProvider解析为virtualType
<virtualType name="PageGridDataProvider" type="Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider">
    <arguments>
        <argument name="collection" xsi:type="object" shared="false">Magento\Cms\Model\ResourceModel\Page\Collection</argument>
        <argument name="filterPool" xsi:type="object" shared="false">CmsGirdFilterPool</argument>
    </arguments>
</virtualType>此虚拟类型配置了第二个集合(Magento\Cms\Model\ResourceModel\Page\Collection)。  
目前尚不清楚为什么需要第二种配置,或其在创建网格中的作用。更高层次的问题可能是dataProvider在创建UI网格中扮演什么角色。更大的更大问题可能是创建了哪些PHP对象来创建UI列表网格,以及配置如何控制它们