Skip to content

Commit 996b58b

Browse files
BEG-151: Use type instead of virtualType and include subscription_model in mview.xml #17
1 parent a0b4f49 commit 996b58b

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

etc/di.xml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,9 @@
2828
</argument>
2929
</arguments>
3030
</type>
31-
<virtualType name="customStagedProductAttributeSubscription" type="Aligent\PrerenderIo\Model\Mview\View\Attribute\Subscription">
31+
<type name="Aligent\Prerender\Model\Mview\View\Attribute\CatalogProductLinkSubscription">
3232
<arguments>
3333
<argument name="entityInterface" xsi:type="string">Magento\Catalog\Api\Data\ProductInterface</argument>
3434
</arguments>
35-
</virtualType>
36-
<type name="Magento\CatalogStaging\Model\Mview\View\SubscriptionFactory">
37-
<arguments>
38-
<argument name="subscriptionModels" xsi:type="array">
39-
<item name="catalog_product_link" xsi:type="string">customStagedProductAttributeSubscription</item>
40-
</argument>
41-
</arguments>
4235
</type>
4336
</config>

etc/mview.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<table name="catalog_product_entity_text" entity_column="entity_id" />
1616
<table name="catalog_product_entity_tier_price" entity_column="entity_id" />
1717
<table name="catalog_product_entity_varchar" entity_column="entity_id" />
18-
<table name="catalog_product_link" entity_column="product_id" />
18+
<table name="catalog_product_link" entity_column="product_id" subscription_model="Aligent\PrerenderIo\Model\Mview\View\Attribute\CatalogProductLinkSubscription"/>
1919
<table name="catalogrule_product_price" entity_column="product_id" />
2020
<table name="cataloginventory_stock_item" entity_column="product_id" />
2121
</subscriptions>
@@ -41,7 +41,7 @@
4141
<table name="catalog_product_entity_text" entity_column="entity_id" />
4242
<table name="catalog_product_entity_tier_price" entity_column="entity_id" />
4343
<table name="catalog_product_entity_varchar" entity_column="entity_id" />
44-
<table name="catalog_product_link" entity_column="product_id" />
44+
<table name="catalog_product_link" entity_column="product_id" subscription_model="Aligent\PrerenderIo\Model\Mview\View\Attribute\CatalogProductLinkSubscription"/>
4545
<table name="catalogrule_product_price" entity_column="product_id" />
4646
<table name="cataloginventory_stock_item" entity_column="product_id" />
4747
<table name="catalog_category_product" entity_column="product_id" />

0 commit comments

Comments
 (0)