This repository was archived by the owner on Nov 19, 2024. It is now read-only.
File tree 1 file changed +3
-3
lines changed
src/guides/v2.3/extension-dev-guide
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ View models can be used by passing the view model class as an argument to a temp
24
24
``` xml
25
25
<block name =" orangeco.new.viewmodel" template =" OrangeCompany_Catalog::example.phtml" >
26
26
<arguments >
27
- <argument name =" view_model " xsi : type =" object" >OrangeCompany\Catalog\ViewModel\MyNewViewModel</argument >
27
+ <argument name =" viewModel " xsi : type =" object" >OrangeCompany\Catalog\ViewModel\MyNewViewModel</argument >
28
28
</arguments >
29
29
</block >
30
30
```
@@ -34,7 +34,7 @@ In the following example, the same view model is used with an existing block in
34
34
``` xml
35
35
<referenceBlock name =" checkout.cart.item.renderers.default" >
36
36
<arguments >
37
- <argument name =" view_model " xsi : type =" object" >OrangeCompany\Catalog\ViewModel\MyNewViewModel</argument >
37
+ <argument name =" viewModel " xsi : type =" object" >OrangeCompany\Catalog\ViewModel\MyNewViewModel</argument >
38
38
</arguments >
39
39
</referenceBlock >
40
40
```
@@ -78,7 +78,7 @@ The view model class is passed as an argument to the `product.info.upsell` block
78
78
<block class =" Magento\Catalog\Block\Product\ProductList\Upsell" name =" product.info.upsell" template =" Magento_Catalog::product/list/items.phtml" >
79
79
<arguments >
80
80
<argument name =" type" xsi : type =" string" >upsell</argument >
81
- <argument name =" view_model " xsi : type =" object" >Magento\Catalog\ViewModel\Product\Listing\PreparePostData</argument >
81
+ <argument name =" viewModel " xsi : type =" object" >Magento\Catalog\ViewModel\Product\Listing\PreparePostData</argument >
82
82
</arguments >
83
83
</block >
84
84
```
You can’t perform that action at this time.
0 commit comments