Skip to content

Commit dec1baf

Browse files
author
Yu Tang
committed
MAGETWO-33658: Refactor Catalog module to use mutable data object interfaces
- Remove copy and paste code
1 parent b463abd commit dec1baf

File tree

2 files changed

+2
-75
lines changed

2 files changed

+2
-75
lines changed

app/code/Magento/Eav/Api/Data/AttributeFrontendLabelInterface.php

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,6 @@
66
*/
77
namespace Magento\Eav\Api\Data;
88

9-
interface AttributeFrontendLabelInterface
9+
interface AttributeFrontendLabelInterface extends AttributeOptionLabelInterface
1010
{
11-
/**
12-
* Return store id
13-
*
14-
* @return int|null
15-
*/
16-
public function getStoreId();
17-
18-
/**
19-
* Set store id
20-
*
21-
* @param int $storeId
22-
* @return $this
23-
*/
24-
public function setStoreId($storeId);
25-
26-
/**
27-
* Return label
28-
*
29-
* @return string|null
30-
*/
31-
public function getLabel();
32-
33-
/**
34-
* Set label
35-
*
36-
* @param string $label
37-
* @return $this
38-
*/
39-
public function setLabel($label);
4011
}

app/code/Magento/Eav/Model/Entity/Attribute/FrontendLabel.php

Lines changed: 1 addition & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -9,51 +9,7 @@
99
/**
1010
* @codeCoverageIgnore
1111
*/
12-
class FrontendLabel extends \Magento\Framework\Model\AbstractExtensibleModel implements
12+
class FrontendLabel extends OptionLabel implements
1313
\Magento\Eav\Api\Data\AttributeFrontendLabelInterface
1414
{
15-
/**#@+
16-
* Constants
17-
*/
18-
const KEY_STORE_ID = 'store_id';
19-
const KEY_LABEL = 'label';
20-
/**#@-*/
21-
22-
/**
23-
* {@inheritdoc}
24-
*/
25-
public function getStoreId()
26-
{
27-
return $this->getData(self::KEY_STORE_ID);
28-
}
29-
30-
/**
31-
* {@inheritdoc}
32-
*/
33-
public function getLabel()
34-
{
35-
return $this->getData(self::KEY_LABEL);
36-
}
37-
38-
/**
39-
* Set store id
40-
*
41-
* @param int $storeId
42-
* @return $this
43-
*/
44-
public function setStoreId($storeId)
45-
{
46-
return $this->setData(self::KEY_STORE_ID, $storeId);
47-
}
48-
49-
/**
50-
* Set label
51-
*
52-
* @param string $label
53-
* @return $this
54-
*/
55-
public function setLabel($label)
56-
{
57-
return $this->setData(self::KEY_LABEL, $label);
58-
}
5915
}

0 commit comments

Comments
 (0)