di.xml 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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\TestModuleMSC\Api\AllSoapAndRestInterface" type="Magento\TestModuleMSC\Model\AllSoapAndRest" />
  10. <preference for="Magento\TestModuleMSC\Api\Data\ItemInterface" type="Magento\TestModuleMSC\Model\Data\Item" />
  11. <preference for="Magento\TestModuleMSC\Api\Data\CustomAttributeDataObjectInterface" type="Magento\TestModuleMSC\Model\Data\CustomAttributeDataObject" />
  12. <preference for="Magento\TestModuleMSC\Api\Data\CustomAttributeNestedDataObjectInterface" type="Magento\TestModuleMSC\Model\Data\CustomAttributeNestedDataObject" />
  13. <virtualType name="Magento\TestModuleMSC\Service\Config\TestModuleMSCMetadataConfig" type="Magento\Framework\Api\ExtensionAttribute\Config\MetadataConfig">
  14. <arguments>
  15. <argument name="attributeMetadataBuilder" xsi:type="object">Magento\TestModuleMSC\Model\Data\Eav\AttributeMetadataBuilder</argument>
  16. <argument name="dataObjectClassName" xsi:type="string">Magento\TestModuleMSC\Model\Data\Item</argument>
  17. </arguments>
  18. </virtualType>
  19. <type name="Magento\TestModuleMSC\Model\Data\Item">
  20. <arguments>
  21. <argument name="resource" xsi:type="object">Magento\TestModuleMSC\Model\ResourceModel\Item</argument>
  22. <argument name="metadataService" xsi:type="object">Magento\TestModuleMSC\Service\Config\TestModuleMSCMetadataConfig</argument>
  23. </arguments>
  24. </type>
  25. <type name="Magento\TestModuleMSC\Model\Data\CustomAttributeDataObject">
  26. <arguments>
  27. <argument name="resource" xsi:type="object">Magento\TestModuleMSC\Model\ResourceModel\Item</argument>
  28. </arguments>
  29. </type>
  30. <virtualType name="CustomAttributeMap" type="Magento\Framework\DataObject">
  31. <arguments>
  32. <argument name="data" xsi:type="array">
  33. <item name="customAttributeDataObjectInterface" xsi:type="string">Magento\TestModuleMSC\Api\Data\CustomAttributeDataObjectInterface</item>
  34. <item name="customAttributeNestedDataObjectInterface" xsi:type="string">Magento\TestModuleMSC\Api\Data\CustomAttributeNestedDataObjectInterface</item>
  35. </argument>
  36. </arguments>
  37. </virtualType>
  38. <type name="Magento\Framework\Webapi\ServiceTypeToEntityTypeMap">
  39. <arguments>
  40. <argument name="serviceTypeToEntityTypeMap" xsi:type="array">
  41. <item name="Magento\TestModuleMSC\Api\AllSoapAndRestInterface" xsi:type="string">1</item>
  42. </argument>
  43. </arguments>
  44. </type>
  45. <type name="Magento\Eav\Model\TypeLocator\ComplexType">
  46. <arguments>
  47. <argument name="backendModelToAttributeTypeMap" xsi:type="array">
  48. <item name="Magento\TestModuleMSC\Api\AllSoapAndRestInterface" xsi:type="array">
  49. <item name="Magento\Sample\BackendType1" xsi:type="string">Magento\TestModuleMSC\Api\Data\CustomAttributeDataObjectInterface</item>
  50. <item name="Magento\Sample\BackendType2" xsi:type="string">Magento\TestModuleMSC\Api\Data\CustomAttributeNestedDataObjectInterface</item>
  51. </item>
  52. </argument>
  53. </arguments>
  54. </type>
  55. </config>