13 use Psr\Log\LoggerInterface;
110 \
Magento\Framework\Translate\InlineInterface $translateInline,
119 $this->_coreRegistry = $coreRegistry;
120 $this->_fileFactory = $fileFactory;
121 $this->_translateInline = $translateInline;
129 parent::__construct($context);
139 $resultPage = $this->resultPageFactory->create();
140 $resultPage->setActiveMenu(
'Magento_Sales::sales_order');
141 $resultPage->addBreadcrumb(
__(
'Sales'),
__(
'Sales'));
142 $resultPage->addBreadcrumb(
__(
'Orders'),
__(
'Orders'));
155 $order = $this->orderRepository->get(
$id);
157 $this->messageManager->addErrorMessage(
__(
'This order no longer exists.'));
158 $this->_actionFlag->set(
'', self::FLAG_NO_DISPATCH,
true);
161 $this->messageManager->addErrorMessage(
__(
'This order no longer exists.'));
162 $this->_actionFlag->set(
'', self::FLAG_NO_DISPATCH,
true);
165 $this->_coreRegistry->register(
'sales_order',
$order);
166 $this->_coreRegistry->register(
'current_order',
$order);
175 $formKeyIsValid = $this->_formKeyValidator->validate($this->
getRequest());
177 return ($formKeyIsValid && $isPost);
__construct(Action\Context $context, \Magento\Framework\Registry $coreRegistry, \Magento\Framework\App\Response\Http\FileFactory $fileFactory, \Magento\Framework\Translate\InlineInterface $translateInline, \Magento\Framework\View\Result\PageFactory $resultPageFactory, \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory, \Magento\Framework\View\Result\LayoutFactory $resultLayoutFactory, \Magento\Framework\Controller\Result\RawFactory $resultRawFactory, OrderManagementInterface $orderManagement, OrderRepositoryInterface $orderRepository, LoggerInterface $logger)