di.xml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  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. <preference for="Magento\Eav\Model\Entity\Setup\PropertyMapperInterface" type="Magento\Eav\Model\Entity\Setup\PropertyMapper\Composite" />
  10. <preference for="Magento\Eav\Model\Entity\AttributeLoaderInterface" type="Magento\Eav\Model\Entity\AttributeLoader" />
  11. <preference for="Magento\Eav\Model\Entity\Attribute\UniqueValidationInterface" type="Magento\Eav\Model\Entity\Attribute\UniqueValidator" />
  12. <preference for="Magento\Eav\Api\Data\AttributeInterface" type="Magento\Eav\Model\Entity\Attribute" />
  13. <preference for="Magento\Eav\Api\AttributeRepositoryInterface" type="Magento\Eav\Model\AttributeRepository" />
  14. <preference for="Magento\Eav\Api\Data\AttributeGroupInterface" type="Magento\Eav\Model\Entity\Attribute\Group" />
  15. <preference for="Magento\Eav\Api\AttributeGroupRepositoryInterface" type="Magento\Eav\Model\Attribute\GroupRepository" />
  16. <preference for="Magento\Eav\Api\AttributeSetRepositoryInterface" type="Magento\Eav\Model\AttributeSetRepository" />
  17. <preference for="Magento\Eav\Api\AttributeSetManagementInterface" type="Magento\Eav\Model\AttributeSetManagement" />
  18. <preference for="Magento\Eav\Api\Data\AttributeSetInterface" type="Magento\Eav\Model\Entity\Attribute\Set" />
  19. <preference for="Magento\Eav\Api\AttributeManagementInterface" type="Magento\Eav\Model\AttributeManagement" />
  20. <preference for="Magento\Eav\Api\Data\AttributeFrontendLabelInterface" type="Magento\Eav\Model\Entity\Attribute\FrontendLabel" />
  21. <preference for="Magento\Eav\Api\Data\AttributeOptionInterface" type="Magento\Eav\Model\Entity\Attribute\Option" />
  22. <preference for="Magento\Eav\Api\AttributeOptionManagementInterface" type="Magento\Eav\Model\Entity\Attribute\OptionManagement" />
  23. <preference for="Magento\Eav\Api\Data\AttributeOptionLabelInterface" type="Magento\Eav\Model\Entity\Attribute\OptionLabel" />
  24. <preference for="Magento\Eav\Api\Data\AttributeValidationRuleInterface" type="Magento\Eav\Model\Entity\Attribute\ValidationRule" />
  25. <preference for="Magento\Eav\Api\Data\AttributeSearchResultsInterface" type="Magento\Framework\Api\SearchResults" />
  26. <preference for="Magento\Eav\Api\Data\AttributeSetSearchResultsInterface" type="Magento\Framework\Api\SearchResults" />
  27. <preference for="Magento\Eav\Api\Data\AttributeGroupSearchResultsInterface" type="Magento\Framework\Api\SearchResults" />
  28. <preference for="Magento\Framework\Webapi\CustomAttributeTypeLocatorInterface" type="Magento\Eav\Model\TypeLocator" />
  29. <type name="Magento\Eav\Model\Entity\Attribute\Config">
  30. <arguments>
  31. <argument name="reader" xsi:type="object">Magento\Eav\Model\Entity\Attribute\Config\Reader\Proxy</argument>
  32. </arguments>
  33. </type>
  34. <type name="Magento\Eav\Model\ResourceModel\Helper">
  35. <arguments>
  36. <argument name="modulePrefix" xsi:type="string">eav</argument>
  37. </arguments>
  38. </type>
  39. <type name="Magento\Eav\Model\Entity\Setup\PropertyMapper\Composite">
  40. <arguments>
  41. <argument name="propertyMappers" xsi:type="array">
  42. <item name="default" xsi:type="string">Magento\Eav\Model\Entity\Setup\PropertyMapper</item>
  43. </argument>
  44. </arguments>
  45. </type>
  46. <type name="Magento\Eav\Model\ResourceModel\Entity\Attribute">
  47. <plugin name="storeLabelCaching" type="Magento\Eav\Plugin\Model\ResourceModel\Entity\Attribute" />
  48. </type>
  49. <type name="Magento\Framework\Webapi\ServiceTypeToEntityTypeMap">
  50. <arguments>
  51. <argument name="serviceTypeToEntityTypeMap" xsi:type="array" />
  52. </arguments>
  53. </type>
  54. <type name="Magento\Eav\Model\TypeLocator">
  55. <arguments>
  56. <argument name="typeLocators" xsi:type="array">
  57. <item name="simpleType" sortOrder="50" xsi:type="object">Magento\Eav\Model\TypeLocator\SimpleType</item>
  58. <item name="complexType" sortOrder="10" xsi:type="object">Magento\Eav\Model\TypeLocator\ComplexType</item>
  59. <item name="serviceClassType" sortOrder="0" xsi:type="object">Magento\Eav\Model\TypeLocator\ServiceClassLocator</item>
  60. </argument>
  61. </arguments>
  62. </type>
  63. <type name="Magento\Eav\Model\TypeLocator\ComplexType">
  64. <arguments>
  65. <argument name="backendModelToAttributeTypeMap" xsi:type="array">
  66. <item name="Magento\Eav\Model\Attribute\Data\Text" xsi:type="string">string</item>
  67. <item name="Magento\Eav\Model\Attribute\Data\Date" xsi:type="string">string</item>
  68. <item name="Magento\Eav\Model\Attribute\Data\Boolean" xsi:type="string">boolean</item>
  69. <item name="Magento\Eav\Model\Attribute\Data\File" xsi:type="string">string</item>
  70. <item name="Magento\Eav\Model\Attribute\Data\Hidden" xsi:type="string">string</item>
  71. <item name="Magento\Eav\Model\Attribute\Data\Image" xsi:type="string">Magento\Framework\Api\Data\ImageContentInterface</item>
  72. <item name="Magento\Eav\Model\Attribute\Data\Multiline" xsi:type="string">string</item>
  73. <item name="Magento\Eav\Model\Attribute\Data\Multiselect" xsi:type="string">string</item>
  74. <item name="Magento\Eav\Model\Attribute\Data\Select" xsi:type="string">string</item>
  75. <item name="Magento\Eav\Model\Attribute\Data\Textarea" xsi:type="string">string</item>
  76. <item name="Magento\Eav\Model\Entity\Attribute\Backend\DefaultBackend" xsi:type="string">string</item>
  77. </argument>
  78. </arguments>
  79. </type>
  80. <type name="Magento\Eav\Model\Entity\Attribute">
  81. <arguments>
  82. <argument name="reservedAttributeList" xsi:type="object">Magento\Catalog\Model\Product\ReservedAttributeList\Proxy</argument>
  83. </arguments>
  84. </type>
  85. <type name="Magento\Framework\EntityManager\Operation\AttributePool">
  86. <arguments>
  87. <argument name="extensionActions" xsi:type="array">
  88. <item name="eav" xsi:type="array">
  89. <item name="default" xsi:type="array">
  90. <item name="read" xsi:type="string">Magento\Eav\Model\ResourceModel\ReadHandler</item>
  91. <item name="create" xsi:type="string">Magento\Eav\Model\ResourceModel\CreateHandler</item>
  92. <item name="update" xsi:type="string">Magento\Eav\Model\ResourceModel\UpdateHandler</item>
  93. </item>
  94. </item>
  95. </argument>
  96. </arguments>
  97. </type>
  98. <type name="Magento\Framework\Model\EntitySnapshot\AttributeProvider">
  99. <arguments>
  100. <argument name="providers" xsi:type="array">
  101. <item name="default" xsi:type="array">
  102. <item name="eav" xsi:type="string">\Magento\Eav\Model\AttributeProvider</item>
  103. </item>
  104. </argument>
  105. </arguments>
  106. </type>
  107. <type name="Magento\Eav\Model\Entity\AbstractEntity">
  108. <plugin name="clean_cache" type="Magento\Framework\App\Cache\FlushCacheByTags" />
  109. </type>
  110. <virtualType name="Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor" type="Magento\Framework\Api\SearchCriteria\CollectionProcessor">
  111. <arguments>
  112. <argument name="processors" xsi:type="array">
  113. <item name="filters" xsi:type="object">Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor\FilterProcessor</item>
  114. <item name="sorting" xsi:type="object">Magento\Framework\Api\SearchCriteria\CollectionProcessor\SortingProcessor</item>
  115. <item name="pagination" xsi:type="object">Magento\Framework\Api\SearchCriteria\CollectionProcessor\PaginationProcessor</item>
  116. </argument>
  117. </arguments>
  118. </virtualType>
  119. <type name="Magento\Eav\Model\AttributeRepository">
  120. <arguments>
  121. <argument name="collectionProcessor" xsi:type="object">Magento\Eav\Model\Api\SearchCriteria\AttributeCollectionProcessor</argument>
  122. </arguments>
  123. </type>
  124. <virtualType name="Magento\Eav\Model\Api\SearchCriteria\AttributeCollectionProcessor" type="Magento\Framework\Api\SearchCriteria\CollectionProcessor">
  125. <arguments>
  126. <argument name="processors" xsi:type="array">
  127. <item name="filters" xsi:type="object">Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor\AttributeFilterProcessor</item>
  128. <item name="sorting" xsi:type="object">Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor\AttributeSortingProcessor</item>
  129. <item name="pagination" xsi:type="object">Magento\Framework\Api\SearchCriteria\CollectionProcessor\PaginationProcessor</item>
  130. </argument>
  131. </arguments>
  132. </virtualType>
  133. <virtualType name="Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor\AttributeFilterProcessor" type="Magento\Framework\Api\SearchCriteria\CollectionProcessor\FilterProcessor">
  134. <arguments>
  135. <argument name="fieldMapping" xsi:type="array">
  136. <item name="attribute_id" xsi:type="string">main_table.attribute_id</item>
  137. </argument>
  138. </arguments>
  139. </virtualType>
  140. <virtualType name="Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor\AttributeSortingProcessor" type="Magento\Framework\Api\SearchCriteria\CollectionProcessor\SortingProcessor">
  141. <arguments>
  142. <argument name="fieldMapping" xsi:type="array">
  143. <item name="attribute_id" xsi:type="string">main_table.attribute_id</item>
  144. </argument>
  145. </arguments>
  146. </virtualType>
  147. <virtualType name="Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor\AttributeSetFilterProcessor" type="Magento\Framework\Api\SearchCriteria\CollectionProcessor\FilterProcessor">
  148. <arguments>
  149. <argument name="customFilters" xsi:type="array">
  150. <item name="entity_type_code" xsi:type="object">Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor\FilterProcessor\AttributeSetEntityTypeCodeFilter</item>
  151. </argument>
  152. </arguments>
  153. </virtualType>
  154. <virtualType name="Magento\Eav\Model\Api\SearchCriteria\AttributeSetCollectionProcessor" type="Magento\Framework\Api\SearchCriteria\CollectionProcessor">
  155. <arguments>
  156. <argument name="processors" xsi:type="array">
  157. <item name="filters" xsi:type="object">Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor\AttributeSetFilterProcessor</item>
  158. <item name="sorting" xsi:type="object">Magento\Framework\Api\SearchCriteria\CollectionProcessor\SortingProcessor</item>
  159. <item name="pagination" xsi:type="object">Magento\Framework\Api\SearchCriteria\CollectionProcessor\PaginationProcessor</item>
  160. </argument>
  161. </arguments>
  162. </virtualType>
  163. <type name="Magento\Eav\Model\AttributeSetRepository">
  164. <arguments>
  165. <argument name="collectionProcessor" xsi:type="object">Magento\Eav\Model\Api\SearchCriteria\AttributeSetCollectionProcessor</argument>
  166. </arguments>
  167. </type>
  168. <virtualType name="Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor\AttributeGroupFilterProcessor" type="Magento\Framework\Api\SearchCriteria\CollectionProcessor\FilterProcessor">
  169. <arguments>
  170. <argument name="fieldMapping" xsi:type="array">
  171. <item name="attribute_group_code" xsi:type="string">main_table.attribute_group_code</item>
  172. </argument>
  173. <argument name="customFilters" xsi:type="array">
  174. <item name="attribute_set_id" xsi:type="object">Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor\FilterProcessor\AttributeGroupAttributeSetIdFilter</item>
  175. <item name="attribute_group_code" xsi:type="object">Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor\FilterProcessor\AttributeGroupCodeFilter</item>
  176. </argument>
  177. </arguments>
  178. </virtualType>
  179. <virtualType name="Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor\AttributeGroupSortingProcessor" type="Magento\Framework\Api\SearchCriteria\CollectionProcessor\SortingProcessor">
  180. <arguments>
  181. <argument name="fieldMapping" xsi:type="array">
  182. <item name="attribute_group_code" xsi:type="string">main_table.attribute_group_code</item>
  183. </argument>
  184. <argument name="defaultOrders" xsi:type="array">
  185. <item name="sort_order" xsi:type="string">ASC</item>
  186. </argument>
  187. </arguments>
  188. </virtualType>
  189. <virtualType name="Magento\Eav\Model\Api\SearchCriteria\AttributeGroupCollectionProcessor" type="Magento\Framework\Api\SearchCriteria\CollectionProcessor">
  190. <arguments>
  191. <argument name="processors" xsi:type="array">
  192. <item name="filters" xsi:type="object">Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor\AttributeGroupFilterProcessor</item>
  193. <item name="sorting" xsi:type="object">Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor\AttributeGroupSortingProcessor</item>
  194. <item name="pagination" xsi:type="object">Magento\Framework\Api\SearchCriteria\CollectionProcessor\PaginationProcessor</item>
  195. </argument>
  196. </arguments>
  197. </virtualType>
  198. <type name="Magento\Eav\Model\Attribute\GroupRepository">
  199. <arguments>
  200. <argument name="collectionProcessor" xsi:type="object">Magento\Eav\Model\Api\SearchCriteria\AttributeGroupCollectionProcessor</argument>
  201. </arguments>
  202. </type>
  203. <type name="Magento\Framework\EntityManager\CompositeMapper">
  204. <arguments>
  205. <argument name="mappers" xsi:type="array">
  206. <item name="mapper" xsi:type="object">Magento\Framework\EntityManager\Mapper</item>
  207. <item name="customAttributesMapper" xsi:type="object">Magento\Eav\Model\CustomAttributesMapper</item>
  208. </argument>
  209. </arguments>
  210. </type>
  211. </config>