Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 
 
 

190 řádky
10 KiB

  1. <?xml version="1.0"?>
  2. <!--
  3. /**
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. -->
  8. <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
  9. <type name="Magento\Downloadable\Helper\Download">
  10. <arguments>
  11. <argument name="coreFileStorageDb" xsi:type="object">Magento\MediaStorage\Helper\File\Storage\Database\Proxy</argument>
  12. </arguments>
  13. </type>
  14. <type name="Magento\Catalog\Model\Product\CartConfiguration">
  15. <plugin name="Downloadable" type="Magento\Downloadable\Model\Product\CartConfiguration\Plugin\Downloadable" />
  16. </type>
  17. <virtualType name="context_for_downloadable" type="Magento\Framework\View\Element\Template\Context">
  18. <arguments>
  19. <argument name="urlBuilder" xsi:type="object">Magento\Framework\Url</argument>
  20. </arguments>
  21. </virtualType>
  22. <type name="Magento\Downloadable\Block\Sales\Order\Email\Items\Order\Downloadable">
  23. <arguments>
  24. <argument name="context" xsi:type="object">context_for_downloadable</argument>
  25. </arguments>
  26. </type>
  27. <type name="Magento\Catalog\Model\Product\TypeTransitionManager">
  28. <plugin name="downloadable_product_transition" type="Magento\Downloadable\Model\Product\TypeTransitionManager\Plugin\Downloadable" />
  29. <arguments>
  30. <argument name="compatibleTypes" xsi:type="array">
  31. <item name="downloadable" xsi:type="const">Magento\Downloadable\Model\Product\Type::TYPE_DOWNLOADABLE</item>
  32. </argument>
  33. </arguments>
  34. </type>
  35. <virtualType name="Magento\Downloadable\Pricing\Price\Pool" type="Magento\Framework\Pricing\Price\Pool">
  36. <arguments>
  37. <argument name="prices" xsi:type="array">
  38. <item name="link_price" xsi:type="string">Magento\Downloadable\Pricing\Price\LinkPrice</item>
  39. </argument>
  40. <argument name="target" xsi:type="object">Magento\Catalog\Pricing\Price\Pool</argument>
  41. </arguments>
  42. </virtualType>
  43. <virtualType name="Magento\Downloadable\Pricing\Price\Collection" type="Magento\Framework\Pricing\Price\Collection">
  44. <arguments>
  45. <argument name="pool" xsi:type="object">Magento\Downloadable\Pricing\Price\Pool</argument>
  46. </arguments>
  47. </virtualType>
  48. <type name="Magento\Framework\Pricing\PriceInfo\Factory">
  49. <arguments>
  50. <argument name="types" xsi:type="array">
  51. <item name="downloadable" xsi:type="array">
  52. <item name="infoClass" xsi:type="string">Magento\Framework\Pricing\PriceInfo\Base</item>
  53. <item name="prices" xsi:type="string">Magento\Downloadable\Pricing\Price\Collection</item>
  54. </item>
  55. </argument>
  56. </arguments>
  57. </type>
  58. <type name="Magento\Downloadable\Model\Product\TypeHandler\TypeHandler">
  59. <arguments>
  60. <argument name="handlers" xsi:type="array">
  61. <item name="sample" xsi:type="object">Magento\Downloadable\Model\Product\TypeHandler\Sample</item>
  62. <item name="link" xsi:type="object">Magento\Downloadable\Model\Product\TypeHandler\Link</item>
  63. </argument>
  64. </arguments>
  65. </type>
  66. <type name="Magento\Quote\Model\Quote\Item\Repository">
  67. <arguments>
  68. <argument name="cartItemProcessors" xsi:type="array">
  69. <item name="downloadable" xsi:type="object">Magento\Downloadable\Model\Quote\Item\CartItemProcessor\Proxy</item>
  70. </argument>
  71. </arguments>
  72. </type>
  73. <type name="Magento\Sales\Api\OrderItemRepositoryInterface">
  74. <arguments>
  75. <argument name="processorPool" xsi:type="array">
  76. <item name="downloadable" xsi:type="object">Magento\Downloadable\Model\ProductOptionProcessor</item>
  77. </argument>
  78. </arguments>
  79. </type>
  80. <type name="Magento\Sales\Model\Order\ProductOption">
  81. <arguments>
  82. <argument name="processorPool" xsi:type="array">
  83. <item name="downloadable" xsi:type="object">Magento\Downloadable\Model\ProductOptionProcessor</item>
  84. </argument>
  85. </arguments>
  86. </type>
  87. <preference for="Magento\Downloadable\Api\LinkRepositoryInterface" type="Magento\Downloadable\Model\LinkRepository" />
  88. <preference for="Magento\Downloadable\Api\SampleRepositoryInterface" type="Magento\Downloadable\Model\SampleRepository" />
  89. <preference for="Magento\Downloadable\Api\Data\LinkInterface" type="Magento\Downloadable\Model\Link" />
  90. <preference for="Magento\Downloadable\Api\Data\SampleInterface" type="Magento\Downloadable\Model\Sample" />
  91. <preference for="Magento\Downloadable\Api\Data\File\ContentInterface" type="Magento\Downloadable\Model\File\Content" />
  92. <preference for="Magento\Downloadable\Api\Data\File\ContentUploaderInterface" type="Magento\Downloadable\Model\File\ContentUploader" />
  93. <preference for="Magento\Downloadable\Model\Product\TypeHandler\TypeHandlerInterface" type="Magento\Downloadable\Model\Product\TypeHandler\TypeHandler" />
  94. <preference for="Magento\Downloadable\Api\Data\DownloadableOptionInterface" type="Magento\Downloadable\Model\DownloadableOption" />
  95. <preference for="Magento\Downloadable\Api\DomainManagerInterface" type="Magento\Downloadable\Model\DomainManager"/>
  96. <type name="Magento\Framework\EntityManager\Operation\ExtensionPool">
  97. <arguments>
  98. <argument name="extensionActions" xsi:type="array">
  99. <item name="Magento\Catalog\Api\Data\ProductInterface" xsi:type="array">
  100. <item name="read" xsi:type="array">
  101. <item name="downloadable_link_read" xsi:type="string">Magento\Downloadable\Model\Link\ReadHandler</item>
  102. <item name="downloadable_sample_read" xsi:type="string">Magento\Downloadable\Model\Sample\ReadHandler</item>
  103. </item>
  104. <item name="create" xsi:type="array">
  105. <item name="downloadable_link_create" xsi:type="string">Magento\Downloadable\Model\Link\CreateHandler</item>
  106. <item name="downloadable_sample_create" xsi:type="string">Magento\Downloadable\Model\Sample\CreateHandler</item>
  107. </item>
  108. <item name="update" xsi:type="array">
  109. <item name="downloadable_link_update" xsi:type="string">Magento\Downloadable\Model\Sample\UpdateHandler</item>
  110. <item name="downloadable_sample_update" xsi:type="string">Magento\Downloadable\Model\Link\UpdateHandler</item>
  111. </item>
  112. <item name="delete" xsi:type="array">
  113. <item name="downloadable_link_delete" xsi:type="string">Magento\Downloadable\Model\Sample\DeleteHandler</item>
  114. <item name="downloadable_sample_delete" xsi:type="string">Magento\Downloadable\Model\Link\DeleteHandler</item>
  115. </item>
  116. </item>
  117. </argument>
  118. </arguments>
  119. </type>
  120. <type name="Magento\Framework\EntityManager\MetadataPool">
  121. <arguments>
  122. <argument name="metadata" xsi:type="array">
  123. <item name="Magento\Downloadable\Api\Data\LinkInterface" xsi:type="array">
  124. <item name="entityTableName" xsi:type="string">downloadable_link</item>
  125. <item name="identifierField" xsi:type="string">link_id</item>
  126. </item>
  127. <item name="Magento\Downloadable\Api\Data\SampleInterface" xsi:type="array">
  128. <item name="entityTableName" xsi:type="string">downloadable_sample</item>
  129. <item name="identifierField" xsi:type="string">sample_id</item>
  130. </item>
  131. </argument>
  132. </arguments>
  133. </type>
  134. <type name="Magento\Catalog\Model\Product\Price\CostStorage">
  135. <arguments>
  136. <argument name="allowedProductTypes" xsi:type="array">
  137. <item name="2" xsi:type="string">downloadable</item>
  138. </argument>
  139. </arguments>
  140. </type>
  141. <type name="Magento\Catalog\Model\Product\Price\Validation\TierPriceValidator">
  142. <arguments>
  143. <argument name="allowedProductTypes" xsi:type="array">
  144. <item name="3" xsi:type="string">downloadable</item>
  145. </argument>
  146. </arguments>
  147. </type>
  148. <type name="Magento\Catalog\Model\Product\Price\BasePriceStorage">
  149. <arguments>
  150. <argument name="allowedProductTypes" xsi:type="array">
  151. <item name="3" xsi:type="string">downloadable</item>
  152. </argument>
  153. </arguments>
  154. </type>
  155. <type name="Magento\Catalog\Model\Product\Price\SpecialPriceStorage">
  156. <arguments>
  157. <argument name="allowedProductTypes" xsi:type="array">
  158. <item name="3" xsi:type="string">downloadable</item>
  159. </argument>
  160. </arguments>
  161. </type>
  162. <type name="Magento\Downloadable\Model\ResourceModel\Indexer\Price">
  163. <arguments>
  164. <argument name="tableStrategy" xsi:type="object">Magento\Catalog\Model\ResourceModel\Product\Indexer\TemporaryTableStrategy</argument>
  165. <argument name="connectionName" xsi:type="string">indexer</argument>
  166. </arguments>
  167. </type>
  168. <type name="Magento\Framework\Console\CommandListInterface">
  169. <arguments>
  170. <argument name="commands" xsi:type="array">
  171. <item name="addDomainsCommand" xsi:type="object">Magento\Downloadable\Console\Command\DomainsAddCommand</item>
  172. <item name="removeDomainsCommand" xsi:type="object">Magento\Downloadable\Console\Command\DomainsRemoveCommand</item>
  173. <item name="showDomainsCommand" xsi:type="object">Magento\Downloadable\Console\Command\DomainsShowCommand</item>
  174. </argument>
  175. </arguments>
  176. </type>
  177. <type name="Magento\Eav\Model\Config">
  178. <arguments>
  179. <argument name="attributesForPreload" xsi:type="array">
  180. <item name="catalog_product" xsi:type="array">
  181. <item name="links_exist" xsi:type="string">catalog_product</item>
  182. <item name="links_purchased_separately" xsi:type="string">catalog_product</item>
  183. <item name="links_title" xsi:type="string">catalog_product</item>
  184. <item name="samples_title" xsi:type="string">catalog_product</item>
  185. </item>
  186. </argument>
  187. </arguments>
  188. </type>
  189. </config>