diff --git a/app/code/Magento/AdminNotification/view/adminhtml/layout/adminhtml_notification_block.xml b/app/code/Magento/AdminNotification/view/adminhtml/layout/adminhtml_notification_block.xml index c68313211c2e6..06fd380cb2a44 100644 --- a/app/code/Magento/AdminNotification/view/adminhtml/layout/adminhtml_notification_block.xml +++ b/app/code/Magento/AdminNotification/view/adminhtml/layout/adminhtml_notification_block.xml @@ -11,7 +11,7 @@ notificationGrid - Magento\AdminNotification\Model\ResourceModel\Grid\Collection + Magento\AdminNotification\Model\ResourceModel\Grid\Collection DESC date_added 1 diff --git a/app/code/Magento/AdvancedSearch/view/adminhtml/layout/catalog_search_block.xml b/app/code/Magento/AdvancedSearch/view/adminhtml/layout/catalog_search_block.xml index b6ef596281e51..f3544863348ec 100644 --- a/app/code/Magento/AdvancedSearch/view/adminhtml/layout/catalog_search_block.xml +++ b/app/code/Magento/AdvancedSearch/view/adminhtml/layout/catalog_search_block.xml @@ -11,7 +11,7 @@ catalog_search_grid - Magento\AdvancedSearch\Model\ResourceModel\Search\Grid\Collection + Magento\AdvancedSearch\Model\ResourceModel\Search\Grid\Collection name ASC 1 diff --git a/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_cache_block.xml b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_cache_block.xml index 50d210f71025b..6d2ecd8d36a99 100644 --- a/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_cache_block.xml +++ b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_cache_block.xml @@ -11,7 +11,7 @@ cache_grid - Magento\Backend\Model\Cache\ResourceModel\Grid\Collection + Magento\Backend\Model\Cache\ResourceModel\Grid\Collection 0 diff --git a/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_design_grid_block.xml b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_design_grid_block.xml index b96614f4bd8db..41bfe6e78a2ad 100644 --- a/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_design_grid_block.xml +++ b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_design_grid_block.xml @@ -11,7 +11,7 @@ designGrid - Magento\Theme\Model\ResourceModel\Design\Collection + Magento\Theme\Model\ResourceModel\Design\Collection 1 1 diff --git a/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_store_grid_block.xml b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_store_grid_block.xml index 126de5eb4084f..d0c0d8fcbf69b 100644 --- a/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_store_grid_block.xml +++ b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_store_grid_block.xml @@ -12,7 +12,7 @@ storeGrid 1 - Magento\Store\Model\ResourceModel\Website\Grid\Collection + Magento\Store\Model\ResourceModel\Website\Grid\Collection diff --git a/app/code/Magento/Backup/view/adminhtml/layout/backup_index_block.xml b/app/code/Magento/Backup/view/adminhtml/layout/backup_index_block.xml index e17618b97e21f..e3e984d933f25 100644 --- a/app/code/Magento/Backup/view/adminhtml/layout/backup_index_block.xml +++ b/app/code/Magento/Backup/view/adminhtml/layout/backup_index_block.xml @@ -11,7 +11,7 @@ backupsGrid - Magento\Backup\Model\Fs\Collection + Magento\Backup\Model\Fs\Collection time desc diff --git a/app/code/Magento/Catalog/view/adminhtml/layout/catalog_product_set_block.xml b/app/code/Magento/Catalog/view/adminhtml/layout/catalog_product_set_block.xml index 44884897461a8..4e7396608826b 100644 --- a/app/code/Magento/Catalog/view/adminhtml/layout/catalog_product_set_block.xml +++ b/app/code/Magento/Catalog/view/adminhtml/layout/catalog_product_set_block.xml @@ -11,7 +11,7 @@ setGrid - Magento\Eav\Model\ResourceModel\Entity\Attribute\Grid\Collection + Magento\Eav\Model\ResourceModel\Entity\Attribute\Grid\Collection set_name ASC 1 diff --git a/app/code/Magento/CatalogRule/view/adminhtml/layout/catalog_rule_promo_catalog_block.xml b/app/code/Magento/CatalogRule/view/adminhtml/layout/catalog_rule_promo_catalog_block.xml index 99d64ed7a635f..f38f6e0fcd850 100644 --- a/app/code/Magento/CatalogRule/view/adminhtml/layout/catalog_rule_promo_catalog_block.xml +++ b/app/code/Magento/CatalogRule/view/adminhtml/layout/catalog_rule_promo_catalog_block.xml @@ -11,7 +11,7 @@ promo_catalog_grid - Magento\CatalogRule\Model\ResourceModel\Grid\Collection + Magento\CatalogRule\Model\ResourceModel\Grid\Collection name ASC 1 diff --git a/app/code/Magento/Email/view/adminhtml/layout/adminhtml_email_template_grid_block.xml b/app/code/Magento/Email/view/adminhtml/layout/adminhtml_email_template_grid_block.xml index fa15560817dd9..87da146d8ce56 100644 --- a/app/code/Magento/Email/view/adminhtml/layout/adminhtml_email_template_grid_block.xml +++ b/app/code/Magento/Email/view/adminhtml/layout/adminhtml_email_template_grid_block.xml @@ -11,7 +11,7 @@ systemEmailTemplateGrid - Magento\Email\Model\ResourceModel\Template\Collection + Magento\Email\Model\ResourceModel\Template\Collection 1 1 diff --git a/app/code/Magento/GroupedProduct/view/adminhtml/layout/groupedproduct_popup_grid.xml b/app/code/Magento/GroupedProduct/view/adminhtml/layout/groupedproduct_popup_grid.xml index 503404c6cb3cf..fab7851df5bc4 100644 --- a/app/code/Magento/GroupedProduct/view/adminhtml/layout/groupedproduct_popup_grid.xml +++ b/app/code/Magento/GroupedProduct/view/adminhtml/layout/groupedproduct_popup_grid.xml @@ -11,7 +11,7 @@ grouped_grid_popup - Magento\GroupedProduct\Model\ResourceModel\Product\Type\Grouped\AssociatedProductsCollection + Magento\GroupedProduct\Model\ResourceModel\Product\Type\Grouped\AssociatedProductsCollection 1 id ASC diff --git a/app/code/Magento/ImportExport/view/adminhtml/layout/adminhtml_history_grid_block.xml b/app/code/Magento/ImportExport/view/adminhtml/layout/adminhtml_history_grid_block.xml index 02fc198cb0ada..51e5827c8ab98 100644 --- a/app/code/Magento/ImportExport/view/adminhtml/layout/adminhtml_history_grid_block.xml +++ b/app/code/Magento/ImportExport/view/adminhtml/layout/adminhtml_history_grid_block.xml @@ -11,7 +11,7 @@ importHistoryGrid - Magento\ImportExport\Model\ResourceModel\History\Collection + Magento\ImportExport\Model\ResourceModel\History\Collection history_id desc diff --git a/app/code/Magento/Indexer/view/adminhtml/layout/indexer_indexer_list_grid.xml b/app/code/Magento/Indexer/view/adminhtml/layout/indexer_indexer_list_grid.xml index bf6b2351f75f1..f1099c4133bca 100644 --- a/app/code/Magento/Indexer/view/adminhtml/layout/indexer_indexer_list_grid.xml +++ b/app/code/Magento/Indexer/view/adminhtml/layout/indexer_indexer_list_grid.xml @@ -13,7 +13,7 @@ 0 0 gridIndexer - Magento\Indexer\Ui\DataProvider\Indexer\DataCollection + Magento\Indexer\Ui\DataProvider\Indexer\DataCollection diff --git a/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_grid_block.xml b/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_grid_block.xml index 506f836f99514..43b67d6904f1a 100644 --- a/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_grid_block.xml +++ b/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_grid_block.xml @@ -13,7 +13,7 @@ integrationGrid - Magento\Integration\Model\ResourceModel\Integration\Collection + Magento\Integration\Model\ResourceModel\Integration\Collection 1 integration_id asc diff --git a/app/code/Magento/Newsletter/view/adminhtml/layout/newsletter_problem_block.xml b/app/code/Magento/Newsletter/view/adminhtml/layout/newsletter_problem_block.xml index 5cc268333de71..838a9dbb41b4b 100644 --- a/app/code/Magento/Newsletter/view/adminhtml/layout/newsletter_problem_block.xml +++ b/app/code/Magento/Newsletter/view/adminhtml/layout/newsletter_problem_block.xml @@ -11,7 +11,7 @@ problemGrid - Magento\Newsletter\Model\ResourceModel\Grid\Collection + Magento\Newsletter\Model\ResourceModel\Grid\Collection true true 1 diff --git a/app/code/Magento/Newsletter/view/adminhtml/layout/newsletter_queue_grid_block.xml b/app/code/Magento/Newsletter/view/adminhtml/layout/newsletter_queue_grid_block.xml index 3bfb52157bb99..8a2c891c68f81 100644 --- a/app/code/Magento/Newsletter/view/adminhtml/layout/newsletter_queue_grid_block.xml +++ b/app/code/Magento/Newsletter/view/adminhtml/layout/newsletter_queue_grid_block.xml @@ -11,7 +11,7 @@ queueGrid - Magento\Newsletter\Model\ResourceModel\Queue\Grid\Collection + Magento\Newsletter\Model\ResourceModel\Queue\Grid\Collection start_at DESC 1 diff --git a/app/code/Magento/Newsletter/view/adminhtml/layout/newsletter_subscriber_block.xml b/app/code/Magento/Newsletter/view/adminhtml/layout/newsletter_subscriber_block.xml index 9de1807af18ec..e8600c2d49d7b 100644 --- a/app/code/Magento/Newsletter/view/adminhtml/layout/newsletter_subscriber_block.xml +++ b/app/code/Magento/Newsletter/view/adminhtml/layout/newsletter_subscriber_block.xml @@ -11,7 +11,7 @@ subscriberGrid - Magento\Newsletter\Model\ResourceModel\Subscriber\Grid\Collection + Magento\Newsletter\Model\ResourceModel\Subscriber\Grid\Collection subscriber_id desc 1 diff --git a/app/code/Magento/Paypal/view/adminhtml/layout/adminhtml_paypal_reports_block.xml b/app/code/Magento/Paypal/view/adminhtml/layout/adminhtml_paypal_reports_block.xml index 12dcc46e3ecee..596381a4b1143 100644 --- a/app/code/Magento/Paypal/view/adminhtml/layout/adminhtml_paypal_reports_block.xml +++ b/app/code/Magento/Paypal/view/adminhtml/layout/adminhtml_paypal_reports_block.xml @@ -11,7 +11,7 @@ settlementGrid - Magento\Paypal\Model\ResourceModel\Report\Settlement\Row\Collection + Magento\Paypal\Model\ResourceModel\Report\Settlement\Row\Collection row_id DESC 1 diff --git a/app/code/Magento/Paypal/view/adminhtml/layout/paypal_billing_agreement_ordersgrid.xml b/app/code/Magento/Paypal/view/adminhtml/layout/paypal_billing_agreement_ordersgrid.xml index 76a105f5abcdf..0510011a6a559 100644 --- a/app/code/Magento/Paypal/view/adminhtml/layout/paypal_billing_agreement_ordersgrid.xml +++ b/app/code/Magento/Paypal/view/adminhtml/layout/paypal_billing_agreement_ordersgrid.xml @@ -9,7 +9,7 @@ - + Magento\Paypal\Model\Billing\Agreement\OrdersUpdater diff --git a/app/code/Magento/Paypal/view/adminhtml/layout/paypal_billing_agreement_view.xml b/app/code/Magento/Paypal/view/adminhtml/layout/paypal_billing_agreement_view.xml index c76539f5cb206..d9c376701db33 100644 --- a/app/code/Magento/Paypal/view/adminhtml/layout/paypal_billing_agreement_view.xml +++ b/app/code/Magento/Paypal/view/adminhtml/layout/paypal_billing_agreement_view.xml @@ -12,7 +12,7 @@ - + Magento\Paypal\Model\Billing\Agreement\OrdersUpdater diff --git a/app/code/Magento/Reports/view/adminhtml/layout/reports_report_customer_accounts_grid.xml b/app/code/Magento/Reports/view/adminhtml/layout/reports_report_customer_accounts_grid.xml index 900dc08d571da..55ca286ad3d47 100644 --- a/app/code/Magento/Reports/view/adminhtml/layout/reports_report_customer_accounts_grid.xml +++ b/app/code/Magento/Reports/view/adminhtml/layout/reports_report_customer_accounts_grid.xml @@ -11,7 +11,7 @@ gridAccounts - Magento\Reports\Model\ResourceModel\Accounts\Collection\Initial + Magento\Reports\Model\ResourceModel\Accounts\Collection\Initial diff --git a/app/code/Magento/Reports/view/adminhtml/layout/reports_report_customer_orders_grid.xml b/app/code/Magento/Reports/view/adminhtml/layout/reports_report_customer_orders_grid.xml index d886e5724cb0b..f97bec3c15253 100644 --- a/app/code/Magento/Reports/view/adminhtml/layout/reports_report_customer_orders_grid.xml +++ b/app/code/Magento/Reports/view/adminhtml/layout/reports_report_customer_orders_grid.xml @@ -11,7 +11,7 @@ gridOrdersCustomer - Magento\Reports\Model\ResourceModel\Customer\Orders\Collection\Initial + Magento\Reports\Model\ResourceModel\Customer\Orders\Collection\Initial diff --git a/app/code/Magento/Reports/view/adminhtml/layout/reports_report_customer_totals_grid.xml b/app/code/Magento/Reports/view/adminhtml/layout/reports_report_customer_totals_grid.xml index 4914829cf6ebc..e1df04237c2a6 100644 --- a/app/code/Magento/Reports/view/adminhtml/layout/reports_report_customer_totals_grid.xml +++ b/app/code/Magento/Reports/view/adminhtml/layout/reports_report_customer_totals_grid.xml @@ -11,7 +11,7 @@ gridTotalsCustomer - Magento\Reports\Model\ResourceModel\Customer\Totals\Collection\Initial + Magento\Reports\Model\ResourceModel\Customer\Totals\Collection\Initial diff --git a/app/code/Magento/Reports/view/adminhtml/layout/reports_report_grid.xml b/app/code/Magento/Reports/view/adminhtml/layout/reports_report_grid.xml index 82aa475807a25..0f6fbabb6a55c 100644 --- a/app/code/Magento/Reports/view/adminhtml/layout/reports_report_grid.xml +++ b/app/code/Magento/Reports/view/adminhtml/layout/reports_report_grid.xml @@ -24,7 +24,7 @@ 0 0 gridReport - Magento\Reports\Model\ResourceModel\Report\Collection + Magento\Reports\Model\ResourceModel\Report\Collection diff --git a/app/code/Magento/Reports/view/adminhtml/layout/reports_report_product_lowstock_grid.xml b/app/code/Magento/Reports/view/adminhtml/layout/reports_report_product_lowstock_grid.xml index 070c39259aabd..62916fe1c1d78 100644 --- a/app/code/Magento/Reports/view/adminhtml/layout/reports_report_product_lowstock_grid.xml +++ b/app/code/Magento/Reports/view/adminhtml/layout/reports_report_product_lowstock_grid.xml @@ -12,7 +12,7 @@ gridLowstock 0 - Magento\Reports\Model\ResourceModel\Product\Lowstock\Collection + Magento\Reports\Model\ResourceModel\Product\Lowstock\Collection diff --git a/app/code/Magento/Reports/view/adminhtml/layout/reports_report_product_sold_grid.xml b/app/code/Magento/Reports/view/adminhtml/layout/reports_report_product_sold_grid.xml index a1b01aeeb526f..22c66352b32e4 100644 --- a/app/code/Magento/Reports/view/adminhtml/layout/reports_report_product_sold_grid.xml +++ b/app/code/Magento/Reports/view/adminhtml/layout/reports_report_product_sold_grid.xml @@ -11,7 +11,7 @@ gridProductsSold - Magento\Reports\Model\ResourceModel\Product\Sold\Collection\Initial + Magento\Reports\Model\ResourceModel\Product\Sold\Collection\Initial diff --git a/app/code/Magento/Reports/view/adminhtml/layout/reports_report_review_customer_grid.xml b/app/code/Magento/Reports/view/adminhtml/layout/reports_report_review_customer_grid.xml index f941ca52eef59..a728f471e4def 100644 --- a/app/code/Magento/Reports/view/adminhtml/layout/reports_report_review_customer_grid.xml +++ b/app/code/Magento/Reports/view/adminhtml/layout/reports_report_review_customer_grid.xml @@ -13,7 +13,7 @@ customers_grid review_cnt desc - Magento\Reports\Model\ResourceModel\Review\Customer\Collection + Magento\Reports\Model\ResourceModel\Review\Customer\Collection diff --git a/app/code/Magento/Reports/view/adminhtml/layout/reports_report_review_product_grid.xml b/app/code/Magento/Reports/view/adminhtml/layout/reports_report_review_product_grid.xml index 1275e761ade3c..26d0e8b13659d 100644 --- a/app/code/Magento/Reports/view/adminhtml/layout/reports_report_review_product_grid.xml +++ b/app/code/Magento/Reports/view/adminhtml/layout/reports_report_review_product_grid.xml @@ -13,7 +13,7 @@ gridProducts review_cnt desc - Magento\Reports\Model\ResourceModel\Review\Product\Collection + Magento\Reports\Model\ResourceModel\Review\Product\Collection diff --git a/app/code/Magento/Reports/view/adminhtml/layout/reports_report_statistics_index.xml b/app/code/Magento/Reports/view/adminhtml/layout/reports_report_statistics_index.xml index 4ec984ef9fc11..649dc7ceeb065 100644 --- a/app/code/Magento/Reports/view/adminhtml/layout/reports_report_statistics_index.xml +++ b/app/code/Magento/Reports/view/adminhtml/layout/reports_report_statistics_index.xml @@ -15,7 +15,7 @@ 0 0 0 - Magento\Reports\Model\ResourceModel\Refresh\Collection + Magento\Reports\Model\ResourceModel\Refresh\Collection diff --git a/app/code/Magento/Review/view/adminhtml/layout/rating_block.xml b/app/code/Magento/Review/view/adminhtml/layout/rating_block.xml index b439bcb1c2710..414cec14c3bec 100644 --- a/app/code/Magento/Review/view/adminhtml/layout/rating_block.xml +++ b/app/code/Magento/Review/view/adminhtml/layout/rating_block.xml @@ -11,7 +11,7 @@ ratingsGrid - Magento\Review\Model\ResourceModel\Rating\Grid\Collection + Magento\Review\Model\ResourceModel\Rating\Grid\Collection rating_code ASC 1 diff --git a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_create_customer_block.xml b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_create_customer_block.xml index 0f5a3559f3008..fe2cb7e01b727 100644 --- a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_create_customer_block.xml +++ b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_create_customer_block.xml @@ -13,7 +13,7 @@ sales_order_create_customer_grid 1 entity_id - Magento\Sales\Model\ResourceModel\Order\Customer\Collection + Magento\Sales\Model\ResourceModel\Order\Customer\Collection 1 customer_grid diff --git a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_creditmemo_grid_block.xml b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_creditmemo_grid_block.xml index 7f14ff3728a47..318416a777f3f 100644 --- a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_creditmemo_grid_block.xml +++ b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_creditmemo_grid_block.xml @@ -11,7 +11,7 @@ order_creditmemos - Magento\Sales\Model\ResourceModel\Order\Creditmemo\Order\Grid\Collection + Magento\Sales\Model\ResourceModel\Order\Creditmemo\Order\Grid\Collection true created_at DESC diff --git a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_invoice_grid_block.xml b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_invoice_grid_block.xml index 941696f0ce898..d69ed42677109 100644 --- a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_invoice_grid_block.xml +++ b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_invoice_grid_block.xml @@ -11,7 +11,7 @@ order_invoices - Magento\Sales\Model\ResourceModel\Order\Invoice\Orders\Grid\Collection + Magento\Sales\Model\ResourceModel\Order\Invoice\Orders\Grid\Collection true created_at DESC diff --git a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_shipment_grid_block.xml b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_shipment_grid_block.xml index 0180efd29d2fc..21b5d3b06c167 100644 --- a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_shipment_grid_block.xml +++ b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_shipment_grid_block.xml @@ -11,7 +11,7 @@ order_shipments - Magento\Sales\Model\ResourceModel\Order\Shipment\Order\Grid\Collection + Magento\Sales\Model\ResourceModel\Order\Shipment\Order\Grid\Collection true created_at DESC diff --git a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_status_index.xml b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_status_index.xml index 87d7644a4b00f..6854d3bb7bc38 100644 --- a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_status_index.xml +++ b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_status_index.xml @@ -12,7 +12,7 @@ sales_order_status_grid - Magento\Sales\Model\ResourceModel\Status\Collection + Magento\Sales\Model\ResourceModel\Status\Collection state desc 1 diff --git a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_transactions_grid_block.xml b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_transactions_grid_block.xml index c2f5532857202..adb722f6d0f54 100644 --- a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_transactions_grid_block.xml +++ b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_transactions_grid_block.xml @@ -13,7 +13,7 @@ order_transactions - + Magento\Sales\Model\Grid\CollectionUpdater true diff --git a/app/code/Magento/Sales/view/adminhtml/layout/sales_transaction_child_block.xml b/app/code/Magento/Sales/view/adminhtml/layout/sales_transaction_child_block.xml index aa8672a68bc6c..5bdad85ebc160 100644 --- a/app/code/Magento/Sales/view/adminhtml/layout/sales_transaction_child_block.xml +++ b/app/code/Magento/Sales/view/adminhtml/layout/sales_transaction_child_block.xml @@ -11,7 +11,7 @@ transactionChildGrid - + Magento\Sales\Model\Grid\Child\CollectionUpdater false diff --git a/app/code/Magento/Sales/view/adminhtml/layout/sales_transactions_grid_block.xml b/app/code/Magento/Sales/view/adminhtml/layout/sales_transactions_grid_block.xml index 9f3b7f23ba20f..37b319b94352d 100644 --- a/app/code/Magento/Sales/view/adminhtml/layout/sales_transactions_grid_block.xml +++ b/app/code/Magento/Sales/view/adminhtml/layout/sales_transactions_grid_block.xml @@ -11,7 +11,7 @@ sales_transactions_grid - Magento\Sales\Model\ResourceModel\Transaction\Grid\Collection + Magento\Sales\Model\ResourceModel\Transaction\Grid\Collection true created_at DESC diff --git a/app/code/Magento/SalesRule/view/adminhtml/layout/sales_rule_promo_quote_index.xml b/app/code/Magento/SalesRule/view/adminhtml/layout/sales_rule_promo_quote_index.xml index 21ce8bfc3eaac..7796f280efcbc 100644 --- a/app/code/Magento/SalesRule/view/adminhtml/layout/sales_rule_promo_quote_index.xml +++ b/app/code/Magento/SalesRule/view/adminhtml/layout/sales_rule_promo_quote_index.xml @@ -12,7 +12,7 @@ promo_quote_grid - Magento\SalesRule\Model\ResourceModel\Rule\Quote\Collection + Magento\SalesRule\Model\ResourceModel\Rule\Quote\Collection sort_order ASC 1 diff --git a/app/code/Magento/Search/view/adminhtml/layout/search_term_block.xml b/app/code/Magento/Search/view/adminhtml/layout/search_term_block.xml index cc2e1509e4412..9dc60bde11315 100644 --- a/app/code/Magento/Search/view/adminhtml/layout/search_term_block.xml +++ b/app/code/Magento/Search/view/adminhtml/layout/search_term_block.xml @@ -11,7 +11,7 @@ searchReportGrid - Magento\Search\Model\ResourceModel\Query\Collection + Magento\Search\Model\ResourceModel\Query\Collection query_id DESC diff --git a/app/code/Magento/Search/view/adminhtml/layout/search_term_grid_block.xml b/app/code/Magento/Search/view/adminhtml/layout/search_term_grid_block.xml index 7330ac1f92712..38c6fa52455b9 100644 --- a/app/code/Magento/Search/view/adminhtml/layout/search_term_grid_block.xml +++ b/app/code/Magento/Search/view/adminhtml/layout/search_term_grid_block.xml @@ -11,7 +11,7 @@ search_term_grid - Magento\Search\Model\ResourceModel\Query\Collection + Magento\Search\Model\ResourceModel\Query\Collection name ASC 1 diff --git a/app/code/Magento/Search/view/adminhtml/layout/search_term_report_block.xml b/app/code/Magento/Search/view/adminhtml/layout/search_term_report_block.xml index b6b1455cf27ca..f4c5d1ab85a0a 100644 --- a/app/code/Magento/Search/view/adminhtml/layout/search_term_report_block.xml +++ b/app/code/Magento/Search/view/adminhtml/layout/search_term_report_block.xml @@ -12,7 +12,7 @@ searchReportGrid - Magento\Search\Model\ResourceModel\Query\Collection + Magento\Search\Model\ResourceModel\Query\Collection query_id DESC diff --git a/app/code/Magento/Sitemap/view/adminhtml/layout/adminhtml_sitemap_index_grid_block.xml b/app/code/Magento/Sitemap/view/adminhtml/layout/adminhtml_sitemap_index_grid_block.xml index cdaa6575d559c..632768e4a5f08 100644 --- a/app/code/Magento/Sitemap/view/adminhtml/layout/adminhtml_sitemap_index_grid_block.xml +++ b/app/code/Magento/Sitemap/view/adminhtml/layout/adminhtml_sitemap_index_grid_block.xml @@ -11,7 +11,7 @@ sitemapGrid - Magento\Sitemap\Model\ResourceModel\Sitemap\Collection + Magento\Sitemap\Model\ResourceModel\Sitemap\Collection sitemap_id diff --git a/app/code/Magento/Tax/view/adminhtml/layout/tax_rate_block.xml b/app/code/Magento/Tax/view/adminhtml/layout/tax_rate_block.xml index 463994262b7d3..5c50b306411ed 100644 --- a/app/code/Magento/Tax/view/adminhtml/layout/tax_rate_block.xml +++ b/app/code/Magento/Tax/view/adminhtml/layout/tax_rate_block.xml @@ -11,7 +11,7 @@ tax_rate_grid - Magento\Tax\Model\TaxRateCollection + Magento\Tax\Model\TaxRateCollection region_name ASC 1 diff --git a/app/code/Magento/Tax/view/adminhtml/layout/tax_rule_block.xml b/app/code/Magento/Tax/view/adminhtml/layout/tax_rule_block.xml index 5e42b835c035d..07afd05e63f8c 100644 --- a/app/code/Magento/Tax/view/adminhtml/layout/tax_rule_block.xml +++ b/app/code/Magento/Tax/view/adminhtml/layout/tax_rule_block.xml @@ -11,7 +11,7 @@ taxRuleGrid - Magento\Tax\Model\TaxRuleCollection + Magento\Tax\Model\TaxRuleCollection tax_rule_id ASC 1 diff --git a/app/code/Magento/Theme/view/adminhtml/layout/adminhtml_system_design_theme_block.xml b/app/code/Magento/Theme/view/adminhtml/layout/adminhtml_system_design_theme_block.xml index bb8fbd44629cf..e19460d56a89b 100644 --- a/app/code/Magento/Theme/view/adminhtml/layout/adminhtml_system_design_theme_block.xml +++ b/app/code/Magento/Theme/view/adminhtml/layout/adminhtml_system_design_theme_block.xml @@ -11,7 +11,7 @@ theme_grid - Magento\Theme\Model\ResourceModel\Theme\Grid\Collection + Magento\Theme\Model\ResourceModel\Theme\Grid\Collection 1 1 diff --git a/app/code/Magento/UrlRewrite/view/adminhtml/layout/adminhtml_url_rewrite_index.xml b/app/code/Magento/UrlRewrite/view/adminhtml/layout/adminhtml_url_rewrite_index.xml index de8575178d06d..012409a8b6aca 100644 --- a/app/code/Magento/UrlRewrite/view/adminhtml/layout/adminhtml_url_rewrite_index.xml +++ b/app/code/Magento/UrlRewrite/view/adminhtml/layout/adminhtml_url_rewrite_index.xml @@ -12,7 +12,7 @@ urlrewriteGrid - Magento\UrlRewrite\Model\ResourceModel\UrlRewriteCollection + Magento\UrlRewrite\Model\ResourceModel\UrlRewriteCollection url_rewrite_id 1 diff --git a/app/code/Magento/User/view/adminhtml/layout/adminhtml_locks_block.xml b/app/code/Magento/User/view/adminhtml/layout/adminhtml_locks_block.xml index 13cfbfe859333..d195ac93c16e5 100644 --- a/app/code/Magento/User/view/adminhtml/layout/adminhtml_locks_block.xml +++ b/app/code/Magento/User/view/adminhtml/layout/adminhtml_locks_block.xml @@ -12,7 +12,7 @@ lockedAdminsGrid - Magento\User\Model\ResourceModel\User\Locked\Collection + Magento\User\Model\ResourceModel\User\Locked\Collection user_id 1 diff --git a/app/code/Magento/User/view/adminhtml/layout/adminhtml_user_grid_block.xml b/app/code/Magento/User/view/adminhtml/layout/adminhtml_user_grid_block.xml index a4bc9aa5ed48b..9099028ce9bfc 100644 --- a/app/code/Magento/User/view/adminhtml/layout/adminhtml_user_grid_block.xml +++ b/app/code/Magento/User/view/adminhtml/layout/adminhtml_user_grid_block.xml @@ -11,7 +11,7 @@ permissionsUserGrid - Magento\User\Model\ResourceModel\User\Collection + Magento\User\Model\ResourceModel\User\Collection 1 username asc diff --git a/app/code/Magento/User/view/adminhtml/layout/adminhtml_user_role_grid_block.xml b/app/code/Magento/User/view/adminhtml/layout/adminhtml_user_role_grid_block.xml index 6d7ce67e2352b..f2d699b6cc08b 100644 --- a/app/code/Magento/User/view/adminhtml/layout/adminhtml_user_role_grid_block.xml +++ b/app/code/Magento/User/view/adminhtml/layout/adminhtml_user_role_grid_block.xml @@ -11,7 +11,7 @@ roleGrid - Magento\Authorization\Model\ResourceModel\Role\Grid\Collection + Magento\Authorization\Model\ResourceModel\Role\Grid\Collection 1 role_id asc diff --git a/app/code/Magento/Variable/view/adminhtml/layout/adminhtml_system_variable_grid_block.xml b/app/code/Magento/Variable/view/adminhtml/layout/adminhtml_system_variable_grid_block.xml index d934e46117fb1..edee7fcca8222 100644 --- a/app/code/Magento/Variable/view/adminhtml/layout/adminhtml_system_variable_grid_block.xml +++ b/app/code/Magento/Variable/view/adminhtml/layout/adminhtml_system_variable_grid_block.xml @@ -11,7 +11,7 @@ customVariablesGrid - Magento\Variable\Model\ResourceModel\Variable\Collection + Magento\Variable\Model\ResourceModel\Variable\Collection variable_id ASC diff --git a/app/code/Magento/Widget/view/adminhtml/layout/adminhtml_widget_instance_block.xml b/app/code/Magento/Widget/view/adminhtml/layout/adminhtml_widget_instance_block.xml index 934b0ca1a85b2..8ca3fab413b25 100644 --- a/app/code/Magento/Widget/view/adminhtml/layout/adminhtml_widget_instance_block.xml +++ b/app/code/Magento/Widget/view/adminhtml/layout/adminhtml_widget_instance_block.xml @@ -13,7 +13,7 @@ widgetInstanceGrid instance_id ASC - Magento\Widget\Model\ResourceModel\Widget\Instance\Collection + Magento\Widget\Model\ResourceModel\Widget\Instance\Collection diff --git a/app/code/Magento/Wishlist/view/adminhtml/layout/customer_index_wishlist.xml b/app/code/Magento/Wishlist/view/adminhtml/layout/customer_index_wishlist.xml index 95b786603390c..e364087405ed9 100644 --- a/app/code/Magento/Wishlist/view/adminhtml/layout/customer_index_wishlist.xml +++ b/app/code/Magento/Wishlist/view/adminhtml/layout/customer_index_wishlist.xml @@ -9,7 +9,7 @@ - Magento\Wishlist\Model\ResourceModel\Item\Collection\Grid + Magento\Wishlist\Model\ResourceModel\Item\Collection\Grid wishlistGrid true added_at diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/LayoutFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/LayoutFilesTest.php index a11cd4b73b5c7..32a58e285d762 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/LayoutFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/LayoutFilesTest.php @@ -77,9 +77,8 @@ public function layoutArgumentsDataProvider() */ protected function isSkippedArgument(array $argumentData) { - // Do not take into account argument name and parameters - unset($argumentData['name']); - unset($argumentData['param']); + // Do not take into account argument name, shared and parameters + unset($argumentData['name'], $argumentData['param'], $argumentData['shared']); $isUpdater = isset($argumentData['updater']); unset($argumentData['updater']); diff --git a/lib/internal/Magento/Framework/View/Layout/Argument/Interpreter/DataObject.php b/lib/internal/Magento/Framework/View/Layout/Argument/Interpreter/DataObject.php index ea9fef369e312..bf607672cae03 100644 --- a/lib/internal/Magento/Framework/View/Layout/Argument/Interpreter/DataObject.php +++ b/lib/internal/Magento/Framework/View/Layout/Argument/Interpreter/DataObject.php @@ -3,10 +3,14 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Framework\View\Layout\Argument\Interpreter; +use Magento\Framework\App\ObjectManager; use Magento\Framework\Data\Argument\InterpreterInterface; use Magento\Framework\ObjectManagerInterface; +use Magento\Framework\Stdlib\BooleanUtils; /** * Interpreter that instantiates object by a class name @@ -14,43 +18,54 @@ class DataObject implements InterpreterInterface { /** - * @var ObjectManagerInterface + * @var \Magento\Framework\ObjectManagerInterface */ private $objectManager; + /** + * @var \Magento\Framework\Stdlib\BooleanUtils + */ + private $booleanUtils; + /** * @var string|null */ private $expectedClass; /** - * @param ObjectManagerInterface $objectManager + * @param \Magento\Framework\ObjectManagerInterface $objectManager * @param string|null $expectedClass + * @param \Magento\Framework\Stdlib\BooleanUtils|null $booleanUtils */ - public function __construct(ObjectManagerInterface $objectManager, $expectedClass = null) - { + public function __construct( + ObjectManagerInterface $objectManager, + ?string $expectedClass = null, + ?BooleanUtils $booleanUtils = null + ) { $this->objectManager = $objectManager; $this->expectedClass = $expectedClass; + $this->booleanUtils = $booleanUtils ?? ObjectManager::getInstance()->get(BooleanUtils::class); } /** - * {@inheritdoc} - * @return object - * @throws \InvalidArgumentException - * @throws \UnexpectedValueException + * @inheritdoc */ public function evaluate(array $data) { if (!isset($data['value'])) { throw new \InvalidArgumentException('Object class name is missing.'); } + + $shared = isset($data['shared']) ? $this->booleanUtils->toBoolean($data['shared']) : true; $className = $data['value']; - $result = $this->objectManager->create($className); + $result = $shared ? $this->objectManager->get($className) : $this->objectManager->create($className); + if ($this->expectedClass && !$result instanceof $this->expectedClass) { throw new \UnexpectedValueException( - sprintf("Instance of %s is expected, got %s instead.", $this->expectedClass, get_class($result)) + \sprintf('Instance of %s is expected, got %s instead.', $this->expectedClass, \get_class($result)) ); } + return $result; } } diff --git a/lib/internal/Magento/Framework/View/Layout/etc/elements.xsd b/lib/internal/Magento/Framework/View/Layout/etc/elements.xsd index 6486b39070788..a5f8ace17bdcc 100755 --- a/lib/internal/Magento/Framework/View/Layout/etc/elements.xsd +++ b/lib/internal/Magento/Framework/View/Layout/etc/elements.xsd @@ -14,6 +14,7 @@ + diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/ObjectTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/ObjectTest.php index 7cc280a930d9c..6e3ba94de507d 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/ObjectTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/ObjectTest.php @@ -3,10 +3,15 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Framework\View\Test\Unit\Layout\Argument\Interpreter; -use \Magento\Framework\View\Layout\Argument\Interpreter\DataObject; +use Magento\Framework\View\Layout\Argument\Interpreter\DataObject; +/** + * Tests layout argument interpreter data object. + */ class ObjectTest extends \PHPUnit\Framework\TestCase { const EXPECTED_CLASS = \Magento\Framework\View\Test\Unit\Layout\Argument\Interpreter\ObjectTest::class; @@ -22,19 +27,55 @@ class ObjectTest extends \PHPUnit\Framework\TestCase protected $_interpreter; /** - * @var DataObject + * @var \Magento\Framework\Stdlib\BooleanUtils + */ + protected $_booleanUtils; + + /** + * @var \Magento\Framework\View\Layout\Argument\Interpreter\DataObject */ protected $_model; protected function setUp() { $this->_objectManager = $this->createMock(\Magento\Framework\ObjectManagerInterface::class); - $this->_model = new DataObject($this->_objectManager, self::EXPECTED_CLASS); + $this->_booleanUtils = $this->createMock(\Magento\Framework\Stdlib\BooleanUtils::class); + $this->_model = new DataObject($this->_objectManager, self::EXPECTED_CLASS, $this->_booleanUtils); } public function testEvaluate() { $input = ['name' => 'dataSource', 'value' => self::EXPECTED_CLASS]; + $this->_objectManager->expects($this->once()) + ->method('get') + ->with(self::EXPECTED_CLASS) + ->willReturn($this); + + $actual = $this->_model->evaluate($input); + $this->assertSame($this, $actual); + } + + public function textEvaluateShareEnabled() + { + $input = ['name' => 'dataSource', 'value' => self::EXPECTED_CLASS, 'shared' => true]; + $this->_booleanUtils->expects($this->once()) + ->method('toBoolean') + ->willReturn(true); + $this->_objectManager->expects($this->once()) + ->method('get') + ->with(self::EXPECTED_CLASS) + ->willReturn($this); + + $actual = $this->_model->evaluate($input); + $this->assertSame($this, $actual); + } + + public function textEvaluateShareDisabled() + { + $input = ['name' => 'dataSource', 'value' => self::EXPECTED_CLASS, 'shared' => false]; + $this->_booleanUtils->expects($this->once()) + ->method('toBoolean') + ->willReturn(false); $this->_objectManager->expects($this->once()) ->method('create') ->with(self::EXPECTED_CLASS) @@ -52,12 +93,56 @@ public function testEvaluateWrongClass($input, $expectedException, $expectedExce $this->expectException($expectedException); $this->expectExceptionMessage($expectedExceptionMessage); $self = $this; + $this->_objectManager->expects($this->any())->method('get')->willReturnCallback( + function ($className) use ($self) { + return $self->createMock($className); + } + ); + + $this->_model->evaluate($input); + } + + /** + * @dataProvider evaluateWrongClassDataProvider + */ + public function testEvaluateShareEnabledWrongClass($input, $expectedException, $expectedExceptionMessage) + { + $this->expectException($expectedException); + $this->expectExceptionMessage($expectedExceptionMessage); + $self = $this; + $this->_booleanUtils->expects($this->any()) + ->method('toBoolean') + ->willReturn(true); + $this->_objectManager->expects($this->any())->method('get')->willReturnCallback( + function ($className) use ($self) { + return $self->createMock($className); + } + ); + + $input['shared'] = true; + + $this->_model->evaluate($input); + } + + /** + * @dataProvider evaluateWrongClassDataProvider + */ + public function testEvaluateShareDisabledWrongClass($input, $expectedException, $expectedExceptionMessage) + { + $this->expectException($expectedException); + $this->expectExceptionMessage($expectedExceptionMessage); + $self = $this; + $this->_booleanUtils->expects($this->any()) + ->method('toBoolean') + ->willReturn(false); $this->_objectManager->expects($this->any())->method('create')->willReturnCallback( function ($className) use ($self) { return $self->createMock($className); } ); + $input['shared'] = false; + $this->_model->evaluate($input); }