Skip to content

Commit 9801f1e

Browse files
committed
MAGETWO-31901: Implement Attributes Mapping to Data Interfaces
- Using Magento\Framework\Object VirtualType instance as a container for complex Custom Attribute Types
1 parent f492140 commit 9801f1e

File tree

4 files changed

+6
-26
lines changed

4 files changed

+6
-26
lines changed

app/code/Magento/Webapi/Model/Soap/Wsdl/Generator.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,15 @@ class Generator
6161
* @param \Magento\Webapi\Model\Cache\Type $cache
6262
* @param \Magento\Framework\Reflection\TypeProcessor $typeProcessor
6363
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
64+
* @param \Magento\Framework\Object $customAttributeMap
6465
*/
6566
public function __construct(
6667
\Magento\Webapi\Model\Soap\Config $apiConfig,
6768
Factory $wsdlFactory,
6869
\Magento\Webapi\Model\Cache\Type $cache,
6970
\Magento\Framework\Reflection\TypeProcessor $typeProcessor,
7071
\Magento\Store\Model\StoreManagerInterface $storeManager,
71-
\Magento\Framework\Api\CustomAttributeMap $customAttributeMap
72+
\Magento\Framework\Object $customAttributeMap
7273
) {
7374
$this->_apiConfig = $apiConfig;
7475
$this->_wsdlFactory = $wsdlFactory;

app/code/Magento/Webapi/etc/di.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@
5252
<argument name="cache" xsi:type="object">Magento\Webapi\Model\Cache\Type</argument>
5353
</arguments>
5454
</type>
55-
<type name="Magento\Webapi\Model\Soap\Config">
55+
<type name="Magento\Webapi\Model\Soap\Wsdl\Generator">
5656
<arguments>
57-
<argument name="customAttributeMap" xsi:type="object">Magento\Framework\Api\CustomAttributeMap</argument>
57+
<argument name="customAttributeMap" xsi:type="object">CustomAttributeMap</argument>
5858
</arguments>
5959
</type>
6060
</config>

dev/tests/api-functional/_files/Magento/TestModuleMSC/etc/di.xml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,12 @@
3030
<argument name="resource" xsi:type="object">Magento\TestModuleMSC\Model\Resource\Item</argument>
3131
</arguments>
3232
</type>
33-
<type name="Magento\TestModuleMSC\Model\Data\CustomAttributeNestedDataObject">
34-
<arguments>
35-
<argument name="resource" xsi:type="object">Magento\TestModuleMSC\Model\Resource\Item</argument>
36-
</arguments>
37-
</type>
38-
<type name="Magento\Framework\Api\CustomAttributeMap">
33+
<virtualType name="CustomAttributeMap" type="Magento\Framework\Object">
3934
<arguments>
4035
<argument name="data" xsi:type="array">
4136
<item name="customAttributeDataObjectInterface" xsi:type="string">Magento\TestModuleMSC\Api\Data\CustomAttributeDataObjectInterface</item>
4237
<item name="customAttributeNestedDataObjectInterface" xsi:type="string">Magento\TestModuleMSC\Api\Data\CustomAttributeNestedDataObjectInterface</item>
4338
</argument>
4439
</arguments>
45-
</type>
40+
</virtualType>
4641
</config>

lib/internal/Magento/Framework/Api/CustomAttributeMap.php

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)