Skip to content

Commit 161d44c

Browse files
committed
MAGETWO-62556: Subscription Request
1 parent 889c73e commit 161d44c

File tree

1 file changed

+12
-6
lines changed
  • app/code/Magento/Backend/Controller/Adminhtml/System/Store

1 file changed

+12
-6
lines changed

app/code/Magento/Backend/Controller/Adminhtml/System/Store/Save.php

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class Save extends \Magento\Backend\Controller\Adminhtml\System\Store
1717
* Process Website model save
1818
*
1919
* @param array $postData
20-
* @return void
20+
* @return array
2121
*/
2222
private function processWebsiteSave($postData)
2323
{
@@ -33,14 +33,16 @@ private function processWebsiteSave($postData)
3333

3434
$websiteModel->save();
3535
$this->messageManager->addSuccess(__('You saved the website.'));
36+
37+
return $postData;
3638
}
3739

3840
/**
3941
* Process Store model save
4042
*
4143
* @param array $postData
4244
* @throws \Magento\Framework\Exception\LocalizedException
43-
* @return void
45+
* @return array
4446
*/
4547
private function processStoreSave($postData)
4648
{
@@ -71,14 +73,16 @@ private function processStoreSave($postData)
7173
$this->_objectManager->get(\Magento\Store\Model\StoreManager::class)->reinitStores();
7274
$this->_eventManager->dispatch($eventName, ['store' => $storeModel]);
7375
$this->messageManager->addSuccess(__('You saved the store view.'));
76+
77+
return $postData;
7478
}
7579

7680
/**
7781
* Process StoreGroup model save
7882
*
7983
* @param array $postData
8084
* @throws \Magento\Framework\Exception\LocalizedException
81-
* @return void
85+
* @return array
8286
*/
8387
private function processGroupSave($postData)
8488
{
@@ -100,6 +104,8 @@ private function processGroupSave($postData)
100104
$groupModel->save();
101105
$this->_eventManager->dispatch('store_group_save', ['group' => $groupModel]);
102106
$this->messageManager->addSuccess(__('You saved the store.'));
107+
108+
return $postData;
103109
}
104110

105111
/**
@@ -118,13 +124,13 @@ public function execute()
118124
try {
119125
switch ($postData['store_type']) {
120126
case 'website':
121-
$this->processWebsiteSave($postData);
127+
$postData = $this->processWebsiteSave($postData);
122128
break;
123129
case 'group':
124-
$this->processGroupSave($postData);
130+
$postData = $this->processGroupSave($postData);
125131
break;
126132
case 'store':
127-
$this->processStoreSave($postData);
133+
$postData = $this->processStoreSave($postData);
128134
break;
129135
default:
130136
$redirectResult->setPath('adminhtml/*/');

0 commit comments

Comments
 (0)