Skip to content

Commit 147d917

Browse files
author
Yuri Kovsher
committed
MAGETWO-32559: Refactor Adminhtml/order directory
1 parent f098175 commit 147d917

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@ class CommentsHistory extends \Magento\Sales\Controller\Adminhtml\Order
1616
public function execute()
1717
{
1818
$this->_initOrder();
19-
$resultPage = $this->resultPageFactory->create();
20-
$html = $resultPage->getLayout()->createBlock('Magento\Sales\Block\Adminhtml\Order\View\Tab\History')->toHtml();
19+
$resultLayout = $this->resultLayoutFactory->create();
20+
$html = $resultLayout->getLayout()
21+
->createBlock('Magento\Sales\Block\Adminhtml\Order\View\Tab\History')
22+
->toHtml();
2123
$this->_translateInline->processResponseBody($html);
2224
/** @var \Magento\Framework\Controller\Result\Raw $resultRaw */
2325
$resultRaw = $this->resultRawFactory->create();
2426
$resultRaw->setContents($html);
25-
2627
return $resultRaw;
2728
}
2829
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function execute()
2020
{
2121
$fileName = 'orders.csv';
2222
/** @var \Magento\Backend\Block\Widget\Grid\ExportInterface $exportBlock */
23-
$exportBlock = $this->resultLayoutFactory->create()
23+
$exportBlock = $this->resultPageFactory->create()
2424
->getLayout()
2525
->getChildBlock('sales.order.grid', 'grid.export');
2626
return $this->_fileFactory->create($fileName, $exportBlock->getCsvFile(), DirectoryList::VAR_DIR);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function execute()
2020
{
2121
$fileName = 'orders.xml';
2222
/** @var \Magento\Backend\Block\Widget\Grid\ExportInterface $exportBlock */
23-
$exportBlock = $this->resultLayoutFactory->create()
23+
$exportBlock = $this->resultPageFactory->create()
2424
->getLayout()
2525
->getChildBlock('sales.order.grid', 'grid.export');
2626
return $this->_fileFactory->create($fileName, $exportBlock->getExcelFile($fileName), DirectoryList::VAR_DIR);

0 commit comments

Comments
 (0)