Skip to content

Commit eda7bae

Browse files
author
Dmytro Poperechnyy
committed
MAGETWO-34989: Implement getDefaultRedirect() method
- DocBlocks updated; - Protected variable context removed from AbstractAction;
1 parent a8983d8 commit eda7bae

File tree

151 files changed

+427
-1260
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+427
-1260
lines changed

app/code/Magento/Backend/Controller/Adminhtml/Auth/Login.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,17 @@ class Login extends \Magento\Backend\Controller\Adminhtml\Auth
1313
*/
1414
protected $resultPageFactory;
1515

16-
/**
17-
* @var \Magento\Backend\Model\View\Result\RedirectFactory
18-
*/
19-
protected $resultRedirectFactory;
20-
2116
/**
2217
* Constructor
2318
*
2419
* @param \Magento\Backend\App\Action\Context $context
2520
* @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
26-
* @param \Magento\Backend\Model\View\Result\RedirectFactory $resultRedirectFactory
2721
*/
2822
public function __construct(
2923
\Magento\Backend\App\Action\Context $context,
30-
\Magento\Framework\View\Result\PageFactory $resultPageFactory,
31-
\Magento\Backend\Model\View\Result\RedirectFactory $resultRedirectFactory
24+
\Magento\Framework\View\Result\PageFactory $resultPageFactory
3225
) {
3326
$this->resultPageFactory = $resultPageFactory;
34-
$this->resultRedirectFactory = $resultRedirectFactory;
3527
parent::__construct($context);
3628
}
3729

app/code/Magento/Backend/Controller/Adminhtml/Auth/Logout.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,13 @@
88

99
class Logout extends \Magento\Backend\Controller\Adminhtml\Auth
1010
{
11-
/**
12-
* @var \Magento\Backend\Model\View\Result\RedirectFactory
13-
*/
14-
protected $resultRedirectFactory;
15-
1611
/**
1712
* @param \Magento\Backend\App\Action\Context $context
18-
* @param \Magento\Backend\Model\View\Result\RedirectFactory $resultRedirectFactory
1913
*/
2014
public function __construct(
21-
\Magento\Backend\App\Action\Context $context,
22-
\Magento\Backend\Model\View\Result\RedirectFactory $resultRedirectFactory
15+
\Magento\Backend\App\Action\Context $context
2316
) {
2417
parent::__construct($context);
25-
$this->resultRedirectFactory = $resultRedirectFactory;
2618
}
2719

2820
/**

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ class Cache extends Action
2525
*/
2626
protected $_cacheFrontendPool;
2727

28-
/**
29-
* @var \Magento\Backend\Model\View\Result\RedirectFactory
30-
*/
31-
protected $resultRedirectFactory;
32-
3328
/**
3429
* @var \Magento\Framework\View\Result\PageFactory
3530
*/
@@ -40,22 +35,19 @@ class Cache extends Action
4035
* @param \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList
4136
* @param \Magento\Framework\App\Cache\StateInterface $cacheState
4237
* @param \Magento\Framework\App\Cache\Frontend\Pool $cacheFrontendPool
43-
* @param \Magento\Backend\Model\View\Result\RedirectFactory $resultRedirectFactory
4438
* @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
4539
*/
4640
public function __construct(
4741
Action\Context $context,
4842
\Magento\Framework\App\Cache\TypeListInterface $cacheTypeList,
4943
\Magento\Framework\App\Cache\StateInterface $cacheState,
5044
\Magento\Framework\App\Cache\Frontend\Pool $cacheFrontendPool,
51-
\Magento\Backend\Model\View\Result\RedirectFactory $resultRedirectFactory,
5245
\Magento\Framework\View\Result\PageFactory $resultPageFactory
5346
) {
5447
parent::__construct($context);
5548
$this->_cacheTypeList = $cacheTypeList;
5649
$this->_cacheState = $cacheState;
5750
$this->_cacheFrontendPool = $cacheFrontendPool;
58-
$this->resultRedirectFactory = $resultRedirectFactory;
5951
$this->resultPageFactory = $resultPageFactory;
6052
}
6153

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,16 @@ class RefreshStatistics extends \Magento\Reports\Controller\Adminhtml\Report\Sta
1111
/**
1212
* @param \Magento\Backend\App\Action\Context $context
1313
* @param \Magento\Framework\Stdlib\DateTime\Filter\Date $dateFilter
14-
* @param \Magento\Backend\Model\View\Result\RedirectFactory $resultRedirectFactory
1514
* @param array $reportTypes
1615
* @param \Psr\Log\LoggerInterface $logger
1716
*/
1817
public function __construct(
1918
\Magento\Backend\App\Action\Context $context,
2019
\Magento\Framework\Stdlib\DateTime\Filter\Date $dateFilter,
21-
\Magento\Backend\Model\View\Result\RedirectFactory $resultRedirectFactory,
2220
array $reportTypes,
2321
\Psr\Log\LoggerInterface $logger
2422
) {
25-
parent::__construct($context, $dateFilter, $resultRedirectFactory, $reportTypes);
23+
parent::__construct($context, $dateFilter, $reportTypes);
2624
$this->logger = $logger;
2725
}
2826

app/code/Magento/Backend/Controller/Adminhtml/Denied.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,20 @@
88

99
class Denied extends \Magento\Backend\App\Action
1010
{
11-
/**
12-
* @var \Magento\Backend\Model\View\Result\RedirectFactory
13-
*/
14-
protected $resultRedirectFactory;
15-
1611
/**
1712
* @var \Magento\Framework\View\Result\PageFactory
1813
*/
1914
protected $resultPageFactory;
2015

2116
/**
2217
* @param \Magento\Backend\App\Action\Context $context
23-
* @param \Magento\Backend\Model\View\Result\RedirectFactory $resultRedirectFactory
2418
* @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
2519
*/
2620
public function __construct(
2721
\Magento\Backend\App\Action\Context $context,
28-
\Magento\Backend\Model\View\Result\RedirectFactory $resultRedirectFactory,
2922
\Magento\Framework\View\Result\PageFactory $resultPageFactory
3023
) {
3124
parent::__construct($context);
32-
$this->resultRedirectFactory = $resultRedirectFactory;
3325
$this->resultPageFactory = $resultPageFactory;
3426
}
3527

app/code/Magento/Backend/Controller/Adminhtml/Index/ChangeLocale.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,14 @@
88

99
class ChangeLocale extends \Magento\Backend\Controller\Adminhtml\Index
1010
{
11-
/**
12-
* @var \Magento\Backend\Model\View\Result\RedirectFactory
13-
*/
14-
protected $resultRedirectFactory;
15-
1611
/**
1712
* Constructor
1813
*
1914
* @param \Magento\Backend\App\Action\Context $context
20-
* @param \Magento\Backend\Model\View\Result\RedirectFactory $resultRedirectFactory
2115
*/
2216
public function __construct(
23-
\Magento\Backend\App\Action\Context $context,
24-
\Magento\Backend\Model\View\Result\RedirectFactory $resultRedirectFactory
17+
\Magento\Backend\App\Action\Context $context
2518
) {
26-
$this->resultRedirectFactory = $resultRedirectFactory;
2719
parent::__construct($context);
2820
}
2921

app/code/Magento/Backend/Controller/Adminhtml/Index/Index.php

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,12 @@
88

99
class Index extends \Magento\Backend\Controller\Adminhtml\Index
1010
{
11-
/**
12-
* @var \Magento\Backend\Model\View\Result\RedirectFactory
13-
*/
14-
protected $resultRedirectFactory;
15-
1611
/**
1712
* @param \Magento\Backend\App\Action\Context $context
18-
* @param \Magento\Backend\Model\View\Result\RedirectFactory $resultRedirectFactory
1913
*/
20-
public function __construct(
21-
\Magento\Backend\App\Action\Context $context,
22-
\Magento\Backend\Model\View\Result\RedirectFactory $resultRedirectFactory
23-
) {
14+
public function __construct(\Magento\Backend\App\Action\Context $context)
15+
{
2416
parent::__construct($context);
25-
$this->resultRedirectFactory = $resultRedirectFactory;
2617
}
2718

2819
/**

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

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,12 @@
99

1010
class Save extends \Magento\Backend\Controller\Adminhtml\System\Account
1111
{
12-
/**
13-
* @var \Magento\Backend\Model\View\Result\RedirectFactory
14-
*/
15-
protected $resultRedirectFactory;
16-
1712
/**
1813
* @param \Magento\Backend\App\Action\Context $context
19-
* @param \Magento\Backend\Model\View\Result\RedirectFactory $resultRedirectFactory
2014
*/
21-
public function __construct(
22-
\Magento\Backend\App\Action\Context $context,
23-
\Magento\Backend\Model\View\Result\RedirectFactory $resultRedirectFactory
24-
) {
15+
public function __construct(\Magento\Backend\App\Action\Context $context)
16+
{
2517
parent::__construct($context);
26-
$this->resultRedirectFactory = $resultRedirectFactory;
2718
}
2819

2920
/**

app/code/Magento/Backend/Controller/Adminhtml/System/Design.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@ class Design extends Action
2121
*/
2222
protected $dateFilter;
2323

24-
/**
25-
* @var \Magento\Backend\Model\View\Result\RedirectFactory
26-
*/
27-
protected $resultRedirectFactory;
28-
2924
/**
3025
* @var \Magento\Backend\Model\View\Result\ForwardFactory
3126
*/
@@ -45,7 +40,6 @@ class Design extends Action
4540
* @param \Magento\Backend\App\Action\Context $context
4641
* @param \Magento\Framework\Registry $coreRegistry
4742
* @param \Magento\Framework\Stdlib\DateTime\Filter\Date $dateFilter
48-
* @param \Magento\Backend\Model\View\Result\RedirectFactory $resultRedirectFactory
4943
* @param \Magento\Backend\Model\View\Result\ForwardFactory $resultForwardFactory
5044
* @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
5145
* @param \Magento\Framework\View\Result\LayoutFactory $resultLayoutFactory
@@ -54,15 +48,13 @@ public function __construct(
5448
\Magento\Backend\App\Action\Context $context,
5549
\Magento\Framework\Registry $coreRegistry,
5650
\Magento\Framework\Stdlib\DateTime\Filter\Date $dateFilter,
57-
\Magento\Backend\Model\View\Result\RedirectFactory $resultRedirectFactory,
5851
\Magento\Backend\Model\View\Result\ForwardFactory $resultForwardFactory,
5952
\Magento\Framework\View\Result\PageFactory $resultPageFactory,
6053
\Magento\Framework\View\Result\LayoutFactory $resultLayoutFactory
6154
) {
6255
$this->_coreRegistry = $coreRegistry;
6356
$this->dateFilter = $dateFilter;
6457
parent::__construct($context);
65-
$this->resultRedirectFactory = $resultRedirectFactory;
6658
$this->resultForwardFactory = $resultForwardFactory;
6759
$this->resultPageFactory = $resultPageFactory;
6860
$this->resultLayoutFactory = $resultLayoutFactory;

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@ class Store extends Action
3636
*/
3737
protected $resultForwardFactory;
3838

39-
/**
40-
* @var \Magento\Backend\Model\View\Result\RedirectFactory
41-
*/
42-
protected $resultRedirectFactory;
43-
4439
/**
4540
* @var \Magento\Framework\View\Result\PageFactory
4641
*/
@@ -51,22 +46,19 @@ class Store extends Action
5146
* @param \Magento\Framework\Registry $coreRegistry
5247
* @param \Magento\Framework\Filter\FilterManager $filterManager
5348
* @param \Magento\Backend\Model\View\Result\ForwardFactory $resultForwardFactory
54-
* @param \Magento\Backend\Model\View\Result\RedirectFactory $resultRedirectFactory
5549
* @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
5650
*/
5751
public function __construct(
5852
\Magento\Backend\App\Action\Context $context,
5953
\Magento\Framework\Registry $coreRegistry,
6054
\Magento\Framework\Filter\FilterManager $filterManager,
6155
\Magento\Backend\Model\View\Result\ForwardFactory $resultForwardFactory,
62-
\Magento\Backend\Model\View\Result\RedirectFactory $resultRedirectFactory,
6356
\Magento\Framework\View\Result\PageFactory $resultPageFactory
6457
) {
6558
$this->_coreRegistry = $coreRegistry;
6659
$this->filterManager = $filterManager;
6760
parent::__construct($context);
6861
$this->resultForwardFactory = $resultForwardFactory;
69-
$this->resultRedirectFactory = $resultRedirectFactory;
7062
$this->resultPageFactory = $resultPageFactory;
7163
}
7264

0 commit comments

Comments
 (0)