@@ -17,7 +17,7 @@ class Save extends \Magento\Backend\Controller\Adminhtml\System\Store
17
17
* Process Website model save
18
18
*
19
19
* @param array $postData
20
- * @return void
20
+ * @return array
21
21
*/
22
22
private function processWebsiteSave ($ postData )
23
23
{
@@ -33,14 +33,16 @@ private function processWebsiteSave($postData)
33
33
34
34
$ websiteModel ->save ();
35
35
$ this ->messageManager ->addSuccess (__ ('You saved the website. ' ));
36
+
37
+ return $ postData ;
36
38
}
37
39
38
40
/**
39
41
* Process Store model save
40
42
*
41
43
* @param array $postData
42
44
* @throws \Magento\Framework\Exception\LocalizedException
43
- * @return void
45
+ * @return array
44
46
*/
45
47
private function processStoreSave ($ postData )
46
48
{
@@ -71,14 +73,16 @@ private function processStoreSave($postData)
71
73
$ this ->_objectManager ->get (\Magento \Store \Model \StoreManager::class)->reinitStores ();
72
74
$ this ->_eventManager ->dispatch ($ eventName , ['store ' => $ storeModel ]);
73
75
$ this ->messageManager ->addSuccess (__ ('You saved the store view. ' ));
76
+
77
+ return $ postData ;
74
78
}
75
79
76
80
/**
77
81
* Process StoreGroup model save
78
82
*
79
83
* @param array $postData
80
84
* @throws \Magento\Framework\Exception\LocalizedException
81
- * @return void
85
+ * @return array
82
86
*/
83
87
private function processGroupSave ($ postData )
84
88
{
@@ -100,6 +104,8 @@ private function processGroupSave($postData)
100
104
$ groupModel ->save ();
101
105
$ this ->_eventManager ->dispatch ('store_group_save ' , ['group ' => $ groupModel ]);
102
106
$ this ->messageManager ->addSuccess (__ ('You saved the store. ' ));
107
+
108
+ return $ postData ;
103
109
}
104
110
105
111
/**
@@ -118,13 +124,13 @@ public function execute()
118
124
try {
119
125
switch ($ postData ['store_type ' ]) {
120
126
case 'website ' :
121
- $ this ->processWebsiteSave ($ postData );
127
+ $ postData = $ this ->processWebsiteSave ($ postData );
122
128
break ;
123
129
case 'group ' :
124
- $ this ->processGroupSave ($ postData );
130
+ $ postData = $ this ->processGroupSave ($ postData );
125
131
break ;
126
132
case 'store ' :
127
- $ this ->processStoreSave ($ postData );
133
+ $ postData = $ this ->processStoreSave ($ postData );
128
134
break ;
129
135
default :
130
136
$ redirectResult ->setPath ('adminhtml/*/ ' );
0 commit comments