/
di.xml
116 lines (116 loc) · 6.91 KB
/
di.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<?xml version="1.0"?>
<!--
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\Downloadable\Helper\Download">
<arguments>
<argument name="coreFileStorageDb" xsi:type="object">Magento\MediaStorage\Helper\File\Storage\Database\Proxy</argument>
</arguments>
</type>
<type name="Magento\Catalog\Model\Product\CartConfiguration">
<plugin name="Downloadable" type="Magento\Downloadable\Model\Product\CartConfiguration\Plugin\Downloadable" />
</type>
<type name="Magento\Catalog\Model\Product\TypeTransitionManager">
<plugin name="downloadable_product_transition" type="Magento\Downloadable\Model\Product\TypeTransitionManager\Plugin\Downloadable" />
<arguments>
<argument name="compatibleTypes" xsi:type="array">
<item name="downloadable" xsi:type="const">Magento\Downloadable\Model\Product\Type::TYPE_DOWNLOADABLE</item>
</argument>
</arguments>
</type>
<virtualType name="Magento\Downloadable\Pricing\Price\Pool" type="Magento\Framework\Pricing\Price\Pool">
<arguments>
<argument name="prices" xsi:type="array">
<item name="link_price" xsi:type="string">Magento\Downloadable\Pricing\Price\LinkPrice</item>
</argument>
<argument name="target" xsi:type="object">Magento\Catalog\Pricing\Price\Pool</argument>
</arguments>
</virtualType>
<virtualType name="Magento\Downloadable\Pricing\Price\Collection" type="Magento\Framework\Pricing\Price\Collection">
<arguments>
<argument name="pool" xsi:type="object">Magento\Downloadable\Pricing\Price\Pool</argument>
</arguments>
</virtualType>
<type name="Magento\Framework\Pricing\PriceInfo\Factory">
<arguments>
<argument name="types" xsi:type="array">
<item name="downloadable" xsi:type="array">
<item name="infoClass" xsi:type="string">Magento\Framework\Pricing\PriceInfo\Base</item>
<item name="prices" xsi:type="string">Magento\Downloadable\Pricing\Price\Collection</item>
</item>
</argument>
</arguments>
</type>
<type name="Magento\Downloadable\Model\Product\TypeHandler\TypeHandler">
<arguments>
<argument name="handlers" xsi:type="array">
<item name="sample" xsi:type="object">Magento\Downloadable\Model\Product\TypeHandler\Sample</item>
<item name="link" xsi:type="object">Magento\Downloadable\Model\Product\TypeHandler\Link</item>
</argument>
</arguments>
</type>
<type name="Magento\Quote\Model\Quote\Item\Repository">
<arguments>
<argument name="cartItemProcessors" xsi:type="array">
<item name="downloadable" xsi:type="object">Magento\Downloadable\Model\Quote\Item\CartItemProcessor</item>
</argument>
</arguments>
</type>
<type name="Magento\Sales\Api\OrderItemRepositoryInterface">
<arguments>
<argument name="processorPool" xsi:type="array">
<item name="downloadable" xsi:type="object">Magento\Downloadable\Model\ProductOptionProcessor</item>
</argument>
</arguments>
</type>
<preference for="\Magento\Downloadable\Api\LinkRepositoryInterface" type="\Magento\Downloadable\Model\LinkRepository" />
<preference for="\Magento\Downloadable\Api\SampleRepositoryInterface" type="\Magento\Downloadable\Model\SampleRepository" />
<preference for="\Magento\Downloadable\Api\Data\LinkInterface" type="\Magento\Downloadable\Model\Link" />
<preference for="\Magento\Downloadable\Api\Data\SampleInterface" type="\Magento\Downloadable\Model\Sample" />
<preference for="\Magento\Downloadable\Api\Data\File\ContentInterface" type="\Magento\Downloadable\Model\File\Content" />
<preference for="\Magento\Downloadable\Api\Data\File\ContentUploaderInterface" type="\Magento\Downloadable\Model\File\ContentUploader" />
<preference for="\Magento\Downloadable\Model\Product\TypeHandler\TypeHandlerInterface" type="\Magento\Downloadable\Model\Product\TypeHandler\TypeHandler" />
<preference for="\Magento\Downloadable\Api\Data\DownloadableOptionInterface" type="\Magento\Downloadable\Model\DownloadableOption" />
<type name="Magento\Framework\EntityManager\Operation\ExtensionPool">
<arguments>
<argument name="extensionActions" xsi:type="array">
<item name="Magento\Catalog\Api\Data\ProductInterface" xsi:type="array">
<item name="read" xsi:type="array">
<item name="downloadable_link_read" xsi:type="string">Magento\Downloadable\Model\Link\ReadHandler</item>
<item name="downloadable_sample_read" xsi:type="string">Magento\Downloadable\Model\Sample\ReadHandler</item>
</item>
<item name="create" xsi:type="array">
<item name="downloadable_link_create" xsi:type="string">Magento\Downloadable\Model\Link\SaveHandler</item>
<item name="downloadable_sample_create" xsi:type="string">Magento\Downloadable\Model\Sample\SaveHandler</item>
</item>
<item name="update" xsi:type="array">
<item name="downloadable_link_update" xsi:type="string">Magento\Downloadable\Model\Sample\SaveHandler</item>
<item name="downloadable_sample_update" xsi:type="string">Magento\Downloadable\Model\Link\SaveHandler</item>
</item>
<item name="delete" xsi:type="array">
<item name="downloadable_link_delete" xsi:type="string">Magento\Downloadable\Model\Sample\DeleteHandler</item>
<item name="downloadable_sample_delete" xsi:type="string">Magento\Downloadable\Model\Link\DeleteHandler</item>
</item>
</item>
</argument>
</arguments>
</type>
<type name="Magento\Framework\EntityManager\MetadataPool">
<arguments>
<argument name="metadata" xsi:type="array">
<item name="Magento\Downloadable\Api\Data\LinkInterface" xsi:type="array">
<item name="entityTableName" xsi:type="string">downloadable_link</item>
<item name="identifierField" xsi:type="string">link_id</item>
</item>
<item name="Magento\Downloadable\Api\Data\SampleInterface" xsi:type="array">
<item name="entityTableName" xsi:type="string">downloadable_sample</item>
<item name="identifierField" xsi:type="string">sample_id</item>
</item>
</argument>
</arguments>
</type>
</config>