Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
data_content_xml.php
Go to the documentation of this file.
1 <?php
7 return [
8  '$replaceRules' => [
9  [
10  'table',
11  'field',
12  \Magento\Framework\Module\Setup\Migration::ENTITY_TYPE_BLOCK,
13  \Magento\Framework\Module\Setup\Migration::FIELD_CONTENT_TYPE_XML,
14  ],
15  ],
16  '$tableData' => [
17  ['field' => '<reference><block class="catalog/product_newProduct" /></reference>'],
18  ['field' => '<reference><block class="catalogSearch/result" /></reference>'],
19  ['field' => '<reference></reference>'],
20  ],
21  '$expected' => [
22  'updates' => [
23  [
24  'table' => 'table',
25  'field' => 'field',
26  'to' => '<reference><block class="Magento\Catalog\Block\Product\NewProduct" /></reference>',
27  'from' => ['`field` = ?' => '<reference><block class="catalog/product_newProduct" /></reference>'],
28  ],
29  [
30  'table' => 'table',
31  'field' => 'field',
32  'to' => '<reference><block class="Magento\CatalogSearch\Block\Result" /></reference>',
33  'from' => ['`field` = ?' => '<reference><block class="catalogSearch/result" /></reference>']
34  ],
35  ],
36  'aliases_map' => [
37  \Magento\Framework\Module\Setup\Migration::ENTITY_TYPE_BLOCK => [
38  'catalog/product_newProduct' => \Magento\Catalog\Block\Product\NewProduct::class,
39  'catalogSearch/result' => \Magento\CatalogSearch\Block\Result::class,
40  ],
41  ],
42  ]
43 ];