Skip to content

Commit 0754a60

Browse files
author
Yuri Kovsher
committed
MAGETWO-34589: Refactor controller actions in the Checkout area
1 parent d4f4da9 commit 0754a60

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

app/code/Magento/Backend/App/Action/Context.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*/
66
namespace Magento\Backend\App\Action;
77

8+
use Magento\Framework\Controller\ResultFactory;
9+
810
/**
911
* Backend Controller context
1012
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -62,6 +64,7 @@ class Context extends \Magento\Framework\App\Action\Context
6264
* @param \Magento\Framework\App\ViewInterface $view
6365
* @param \Magento\Framework\Message\ManagerInterface $messageManager
6466
* @param \Magento\Backend\Model\View\Result\RedirectFactory $resultRedirectFactory
67+
* @param \Magento\Framework\Controller\ResultFactory $resultFactory
6568
* @param \Magento\Backend\Model\Session $session
6669
* @param \Magento\Framework\AuthorizationInterface $authorization
6770
* @param \Magento\Backend\Model\Auth $auth
@@ -83,6 +86,7 @@ public function __construct(
8386
\Magento\Framework\App\ViewInterface $view,
8487
\Magento\Framework\Message\ManagerInterface $messageManager,
8588
\Magento\Backend\Model\View\Result\RedirectFactory $resultRedirectFactory,
89+
ResultFactory $resultFactory,
8690
\Magento\Backend\Model\Session $session,
8791
\Magento\Framework\AuthorizationInterface $authorization,
8892
\Magento\Backend\Model\Auth $auth,
@@ -102,7 +106,8 @@ public function __construct(
102106
$actionFlag,
103107
$view,
104108
$messageManager,
105-
$resultRedirectFactory
109+
$resultRedirectFactory,
110+
$resultFactory
106111
);
107112

108113
$this->_session = $session;

lib/internal/Magento/Framework/App/Action/Context.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*/
66
namespace Magento\Framework\App\Action;
77

8+
use Magento\Framework\Controller\ResultFactory;
9+
810
class Context implements \Magento\Framework\ObjectManager\ContextInterface
911
{
1012
/**
@@ -57,6 +59,11 @@ class Context implements \Magento\Framework\ObjectManager\ContextInterface
5759
*/
5860
protected $resultRedirectFactory;
5961

62+
/**
63+
* @var \Magento\Framework\Controller\ResultFactory
64+
*/
65+
protected $resultFactory;
66+
6067
/**
6168
* @param \Magento\Framework\App\RequestInterface $request
6269
* @param \Magento\Framework\App\ResponseInterface $response
@@ -68,6 +75,7 @@ class Context implements \Magento\Framework\ObjectManager\ContextInterface
6875
* @param \Magento\Framework\App\ViewInterface $view
6976
* @param \Magento\Framework\Message\ManagerInterface $messageManager
7077
* @param \Magento\Framework\Controller\Result\RedirectFactory $resultRedirectFactory
78+
* @param \Magento\Framework\Controller\ResultFactory $resultFactory
7179
*
7280
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
7381
*/
@@ -81,7 +89,8 @@ public function __construct(
8189
\Magento\Framework\App\ActionFlag $actionFlag,
8290
\Magento\Framework\App\ViewInterface $view,
8391
\Magento\Framework\Message\ManagerInterface $messageManager,
84-
\Magento\Framework\Controller\Result\RedirectFactory $resultRedirectFactory
92+
\Magento\Framework\Controller\Result\RedirectFactory $resultRedirectFactory,
93+
ResultFactory $resultFactory
8594
) {
8695
$this->_request = $request;
8796
$this->_response = $response;
@@ -93,6 +102,7 @@ public function __construct(
93102
$this->_view = $view;
94103
$this->messageManager = $messageManager;
95104
$this->resultRedirectFactory = $resultRedirectFactory;
105+
$this->resultFactory = $resultFactory;
96106
}
97107

98108
/**

0 commit comments

Comments
 (0)