Skip to content

Commit 724cfda

Browse files
authored
MAGETWO-75322: #10922 add is_active to Magento\Store\Api\Data\StoreInterface #10923
2 parents aa17e5f + 8225f66 commit 724cfda

File tree

3 files changed

+28
-2
lines changed

3 files changed

+28
-2
lines changed

app/code/Magento/Store/Api/Data/StoreInterface.php

+11
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,17 @@ public function setWebsiteId($websiteId);
6666
*/
6767
public function getStoreGroupId();
6868

69+
/**
70+
* @param int $isActive
71+
* @return $this
72+
*/
73+
public function setIsActive($isActive);
74+
75+
/**
76+
* @return int
77+
*/
78+
public function getIsActive();
79+
6980
/**
7081
* @param int $storeGroupId
7182
* @return $this

app/code/Magento/Store/Model/Store.php

+16-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
* @method int getSortOrder()
2828
* @method int getStoreId()
2929
* @method Store setSortOrder($value)
30-
* @method Store setIsActive($value)
3130
*
3231
* @SuppressWarnings(PHPMD.TooManyFields)
3332
* @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
@@ -1088,6 +1087,22 @@ public function setStoreGroupId($storeGroupId)
10881087
return $this->setGroupId($storeGroupId);
10891088
}
10901089

1090+
/**
1091+
* @inheritdoc
1092+
*/
1093+
public function getIsActive()
1094+
{
1095+
return $this->_getData('is_active');
1096+
}
1097+
1098+
/**
1099+
* @inheritdoc
1100+
*/
1101+
public function setIsActive($isActive)
1102+
{
1103+
return $this->setData('is_active', $isActive);
1104+
}
1105+
10911106
/**
10921107
* Retrieve default group identifier
10931108
*

dev/tests/api-functional/testsuite/Magento/Store/Api/StoreRepositoryTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function testGetList()
4040
$storeViews = $this->_webApiCall($serviceInfo, $requestData);
4141
$this->assertNotNull($storeViews);
4242
$this->assertGreaterThan(1, count($storeViews));
43-
$keys = ['id', 'code', 'name', 'website_id', 'store_group_id'];
43+
$keys = ['id', 'code', 'name', 'website_id', 'store_group_id', 'is_active'];
4444
$this->assertEquals($keys, array_keys($storeViews[0]));
4545
}
4646
}

0 commit comments

Comments
 (0)