Skip to content

Commit a68f739

Browse files
author
vpaladiychuk
committed
Merge remote-tracking branch 'origin/MAGETWO-31522' into MAGETWO-31522
2 parents 107ebaf + 30c22fa commit a68f739

File tree

1 file changed

+47
-3
lines changed

1 file changed

+47
-3
lines changed

app/code/Magento/Sales/Controller/Adminhtml/Order/CommentsHistory.php

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,53 @@
66
*/
77
namespace Magento\Sales\Controller\Adminhtml\Order;
88

9+
use Magento\Backend\App\Action;
10+
911
class CommentsHistory extends \Magento\Sales\Controller\Adminhtml\Order
1012
{
13+
/**
14+
* @var \Magento\Framework\View\LayoutFactory
15+
*/
16+
protected $layoutFactory;
17+
18+
/**
19+
* @param Action\Context $context
20+
* @param \Magento\Framework\Registry $coreRegistry
21+
* @param \Magento\Framework\App\Response\Http\FileFactory $fileFactory
22+
* @param \Magento\Framework\Translate\InlineInterface $translateInline
23+
* @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
24+
* @param \Magento\Backend\Model\View\Result\RedirectFactory $resultRedirectFactory
25+
* @param \Magento\Framework\Controller\Result\JSONFactory $resultJsonFactory
26+
* @param \Magento\Framework\View\Result\LayoutFactory $resultLayoutFactory
27+
* @param \Magento\Framework\Controller\Result\RawFactory $resultRawFactory
28+
* @param \Magento\Framework\View\LayoutFactory $layoutFactory
29+
*/
30+
public function __construct(
31+
Action\Context $context,
32+
\Magento\Framework\Registry $coreRegistry,
33+
\Magento\Framework\App\Response\Http\FileFactory $fileFactory,
34+
\Magento\Framework\Translate\InlineInterface $translateInline,
35+
\Magento\Framework\View\Result\PageFactory $resultPageFactory,
36+
\Magento\Backend\Model\View\Result\RedirectFactory $resultRedirectFactory,
37+
\Magento\Framework\Controller\Result\JSONFactory $resultJsonFactory,
38+
\Magento\Framework\View\Result\LayoutFactory $resultLayoutFactory,
39+
\Magento\Framework\Controller\Result\RawFactory $resultRawFactory,
40+
\Magento\Framework\View\LayoutFactory $layoutFactory
41+
) {
42+
$this->layoutFactory = $layoutFactory;
43+
parent::__construct(
44+
$context,
45+
$coreRegistry,
46+
$fileFactory,
47+
$translateInline,
48+
$resultPageFactory,
49+
$resultRedirectFactory,
50+
$resultJsonFactory,
51+
$resultLayoutFactory,
52+
$resultRawFactory
53+
);
54+
}
55+
1156
/**
1257
* Generate order history for ajax request
1358
*
@@ -16,9 +61,8 @@ class CommentsHistory extends \Magento\Sales\Controller\Adminhtml\Order
1661
public function execute()
1762
{
1863
$this->_initOrder();
19-
$resultLayout = $this->resultLayoutFactory->create();
20-
$html = $resultLayout->getLayout()
21-
->createBlock('Magento\Sales\Block\Adminhtml\Order\View\Tab\History')
64+
$layout = $this->layoutFactory->create();
65+
$html = $layout->createBlock('Magento\Sales\Block\Adminhtml\Order\View\Tab\History')
2266
->toHtml();
2367
$this->_translateInline->processResponseBody($html);
2468
/** @var \Magento\Framework\Controller\Result\Raw $resultRaw */

0 commit comments

Comments
 (0)