Skip to content

Commit e72b280

Browse files
author
Yurii Torbyk
committed
MAGETWO-34993: Refactor controllers from the list (Part1)
1 parent 6658bda commit e72b280

File tree

24 files changed

+320
-333
lines changed

24 files changed

+320
-333
lines changed

app/code/Magento/Backend/Controller/Adminhtml/Cache/CleanImages.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function execute()
2626
}
2727

2828
/**
29-
* Redirect user to the previous or main page
29+
* {@inheritdoc}
3030
*
3131
* @return \Magento\Backend\Model\View\Result\Redirect
3232
*/

app/code/Magento/Backend/Controller/Adminhtml/Cache/CleanMedia.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function execute()
2626
}
2727

2828
/**
29-
* Redirect user to the previous or main page
29+
* {@inheritdoc}
3030
*
3131
* @return \Magento\Backend\Model\View\Result\Redirect
3232
*/

app/code/Magento/Backend/Controller/Adminhtml/Cache/MassDisable.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ class MassDisable extends \Magento\Backend\Controller\Adminhtml\Cache
1414
* Mass action for cache disabling
1515
*
1616
* @return \Magento\Backend\Model\View\Result\Redirect
17+
* @throws \Magento\Framework\Exception\LocalizedException|\Exception
1718
*/
1819
public function execute()
1920
{
@@ -39,7 +40,7 @@ public function execute()
3940
}
4041

4142
/**
42-
* Redirect user to the previous or main page
43+
* {@inheritdoc}
4344
*
4445
* @return \Magento\Backend\Model\View\Result\Redirect
4546
*/

app/code/Magento/Backend/Controller/Adminhtml/Cache/MassEnable.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ class MassEnable extends \Magento\Backend\Controller\Adminhtml\Cache
1414
* Mass action for cache enabling
1515
*
1616
* @return \Magento\Backend\Model\View\Result\Redirect
17+
* @throws \Magento\Framework\Exception\LocalizedException|\Exception
1718
*/
1819
public function execute()
1920
{
@@ -38,7 +39,7 @@ public function execute()
3839
}
3940

4041
/**
41-
* Redirect user to the previous or main page
42+
* {@inheritdoc}
4243
*
4344
* @return \Magento\Backend\Model\View\Result\Redirect
4445
*/

app/code/Magento/Backend/Controller/Adminhtml/Cache/MassRefresh.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ class MassRefresh extends \Magento\Backend\Controller\Adminhtml\Cache
1414
* Mass action for cache refresh
1515
*
1616
* @return \Magento\Backend\Model\View\Result\Redirect
17+
* @throws \Magento\Framework\Exception\LocalizedException|\Exception
1718
*/
1819
public function execute()
1920
{
@@ -36,7 +37,7 @@ public function execute()
3637
}
3738

3839
/**
39-
* Redirect user to the previous or main page
40+
* {@inheritdoc}
4041
*
4142
* @return \Magento\Backend\Model\View\Result\Redirect
4243
*/

app/code/Magento/Backend/Controller/Adminhtml/Dashboard/RefreshStatistics.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public function __construct(
2626

2727
/**
2828
* @return \Magento\Backend\Model\View\Result\Redirect
29+
* @throws \Magento\Framework\Exception\LocalizedException|\Exception
2930
*/
3031
public function execute()
3132
{
@@ -39,7 +40,7 @@ public function execute()
3940
}
4041

4142
/**
42-
* Redirect user to the previous or main page
43+
* {@inheritdoc}
4344
*
4445
* @return \Magento\Backend\Model\View\Result\Redirect
4546
*/

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function execute()
6868
}
6969

7070
/**
71-
* Redirect user to the previous or main page
71+
* {@inheritdoc}
7272
*
7373
* @return \Magento\Backend\Model\View\Result\Redirect
7474
*/

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

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class DeleteGroupPost extends \Magento\Backend\Controller\Adminhtml\System\Store
1010
{
1111
/**
1212
* @return \Magento\Backend\Model\View\Result\Redirect
13+
* @throws \Magento\Framework\Exception\LocalizedException|\Exception
1314
*/
1415
public function execute()
1516
{
@@ -35,18 +36,4 @@ public function execute()
3536
$this->messageManager->addSuccess(__('The store has been deleted.'));
3637
return $redirectResult->setPath('adminhtml/*/');
3738
}
38-
39-
/**
40-
* Redirect user to the previous or main page
41-
*
42-
* @return \Magento\Backend\Model\View\Result\Redirect
43-
*/
44-
public function getDefaultRedirect()
45-
{
46-
$resultRedirect = $this->resultRedirectFactory->create();
47-
return $resultRedirect->setPath(
48-
'adminhtml/*/editGroup',
49-
['group_id' => $this->getRequest()->getParam('item_id')]
50-
);
51-
}
5239
}

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

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class DeleteStorePost extends \Magento\Backend\Controller\Adminhtml\System\Store
1212
* Delete store view post action
1313
*
1414
* @return \Magento\Backend\Model\View\Result\Redirect
15+
* @throws \Magento\Framework\Exception\LocalizedException|\Exception
1516
*/
1617
public function execute()
1718
{
@@ -39,18 +40,4 @@ public function execute()
3940
$this->messageManager->addSuccess(__('The store view has been deleted.'));
4041
return $redirectResult->setPath('adminhtml/*/');
4142
}
42-
43-
/**
44-
* Redirect user to the previous or main page
45-
*
46-
* @return \Magento\Backend\Model\View\Result\Redirect
47-
*/
48-
public function getDefaultRedirect()
49-
{
50-
$resultRedirect = $this->resultRedirectFactory->create();
51-
return $resultRedirect->setPath(
52-
'adminhtml/*/editStore',
53-
['store_id' => $this->getRequest()->getParam('item_id')]
54-
);
55-
}
5643
}

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

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class DeleteWebsitePost extends \Magento\Backend\Controller\Adminhtml\System\Sto
1010
{
1111
/**
1212
* @return \Magento\Backend\Model\View\Result\Redirect
13+
* @throws \Magento\Framework\Exception\LocalizedException|\Exception
1314
*/
1415
public function execute()
1516
{
@@ -37,18 +38,4 @@ public function execute()
3738
$this->messageManager->addSuccess(__('The website has been deleted.'));
3839
return $redirectResult->setPath('adminhtml/*/');
3940
}
40-
41-
/**
42-
* Redirect user to the previous or main page
43-
*
44-
* @return \Magento\Backend\Model\View\Result\Redirect
45-
*/
46-
public function getDefaultRedirect()
47-
{
48-
$resultRedirect = $this->resultRedirectFactory->create();
49-
return $resultRedirect->setPath(
50-
'adminhtml/*/editWebsite',
51-
['website_id' => $this->getRequest()->getParam('item_id')]
52-
);
53-
}
5441
}

0 commit comments

Comments
 (0)