Skip to content

Commit a58abef

Browse files
author
Yu Tang
committed
MAGETWO-36792: Remove Magento\ConfigurableProduct\Api\OptionTypesListInterface and type field in OptionInterface
1 parent 4a5410c commit a58abef

File tree

11 files changed

+0
-175
lines changed

11 files changed

+0
-175
lines changed

app/code/Magento/ConfigurableProduct/Api/Data/OptionInterface.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,6 @@ public function getLabel();
4141
*/
4242
public function setLabel($label);
4343

44-
/**
45-
* @return string|null
46-
*/
47-
public function getType();
48-
49-
/**
50-
* @param string $type
51-
* @return $this
52-
*/
53-
public function setType($type);
54-
5544
/**
5645
* @return int|null
5746
*/

app/code/Magento/ConfigurableProduct/Api/OptionTypesListInterface.php

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

app/code/Magento/ConfigurableProduct/Model/OptionRepository.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,6 @@ public function validateNewOptionData(\Magento\ConfigurableProduct\Api\Data\Opti
253253
if (!$option->getAttributeId()) {
254254
$inputException->addError(__('Option attribute ID is not specified.'));
255255
}
256-
if (!$option->getType()) {
257-
$inputException->addError(__('Option type is not specified.'));
258-
}
259256
if (!$option->getLabel()) {
260257
$inputException->addError(__('Option label is not specified.'));
261258
}

app/code/Magento/ConfigurableProduct/Model/OptionTypesList.php

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

app/code/Magento/ConfigurableProduct/Model/Product/Type/Configurable/Attribute.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ class Attribute extends \Magento\Framework\Model\AbstractExtensibleModel impleme
2424
*/
2525
const KEY_ATTRIBUTE_ID = 'attribute_id';
2626
const KEY_LABEL = 'label';
27-
const KEY_TYPE = 'type';
2827
const KEY_POSITION = 'position';
2928
const KEY_IS_USE_DEFAULT = 'is_use_default';
3029
const KEY_VALUES = 'values';
@@ -119,15 +118,6 @@ public function getAttributeId()
119118
return $this->getData(self::KEY_ATTRIBUTE_ID);
120119
}
121120

122-
/**
123-
* {@inheritdoc}
124-
* @codeCoverageIgnore
125-
*/
126-
public function getType()
127-
{
128-
return $this->getData(self::KEY_TYPE);
129-
}
130-
131121
/**
132122
* {@inheritdoc}
133123
* @codeCoverageIgnore
@@ -174,15 +164,6 @@ public function setLabel($label)
174164
return $this->setData(self::KEY_LABEL, $label);
175165
}
176166

177-
/**
178-
* @param string $type
179-
* @return $this
180-
*/
181-
public function setType($type)
182-
{
183-
return $this->setData(self::KEY_TYPE, $type);
184-
}
185-
186167
/**
187168
* @param int $position
188169
* @return $this

app/code/Magento/ConfigurableProduct/Test/Unit/Model/OptionTypesListTest.php

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

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
9-
<preference for="Magento\ConfigurableProduct\Api\OptionTypesListInterface" type="Magento\ConfigurableProduct\Model\OptionTypesList" />
109
<preference for="Magento\ConfigurableProduct\Api\ConfigurableProductManagementInterface" type="Magento\ConfigurableProduct\Model\ConfigurableProductManagement" />
1110
<preference for="Magento\ConfigurableProduct\Api\LinkManagementInterface" type="Magento\ConfigurableProduct\Model\LinkManagement" />
1211
<preference for="Magento\ConfigurableProduct\Api\OptionRepositoryInterface" type="Magento\ConfigurableProduct\Model\OptionRepository" />

app/code/Magento/ConfigurableProduct/etc/webapi.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,6 @@
4343
<resource ref="Magento_Catalog::products"/>
4444
</resources>
4545
</route>
46-
<route url="/V1/configurable-products/options/types" method="GET">
47-
<service class="Magento\ConfigurableProduct\Api\OptionTypesListInterface" method="getItems" />
48-
<resources>
49-
<resource ref="Magento_Catalog::products" />
50-
</resources>
51-
</route>
5246
<route url="/V1/configurable-products/:sku/options" method="POST">
5347
<service class="Magento\ConfigurableProduct\Api\OptionRepositoryInterface" method="save" />
5448
<resources>

dev/tests/api-functional/testsuite/Magento/ConfigurableProduct/Api/OptionRepositoryTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ public function testAdd()
166166
];
167167
$option = [
168168
'attribute_id' => 'test_configurable',
169-
'type' => 'select',
170169
'label' => 'Test',
171170
'values' => [
172171
[

dev/tests/api-functional/testsuite/Magento/ConfigurableProduct/Api/OptionTypesListTest.php

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

0 commit comments

Comments
 (0)