mirror of
https://github.com/bdnugget/magento2.git
synced 2026-11-08 01:37:36 +00:00
30 lines
892 B
PHP
30 lines
892 B
PHP
<?php
|
|
/**
|
|
* Copyright © Magento, Inc. All rights reserved.
|
|
* See COPYING.txt for license details.
|
|
*/
|
|
namespace Magento\Sales\Controller\Adminhtml\Order\Create;
|
|
|
|
class Cancel extends \Magento\Sales\Controller\Adminhtml\Order\Create
|
|
{
|
|
/**
|
|
* Cancel order create
|
|
*
|
|
* @return \Magento\Backend\Model\View\Result\Redirect
|
|
*/
|
|
public function execute()
|
|
{
|
|
/** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
|
|
$resultRedirect = $this->resultRedirectFactory->create();
|
|
|
|
if ($orderId = $this->_getSession()->getReordered()) {
|
|
$this->_getSession()->clearStorage();
|
|
$resultRedirect->setPath('sales/order/view', ['order_id' => $orderId]);
|
|
} else {
|
|
$this->_getSession()->clearStorage();
|
|
$resultRedirect->setPath('sales/*');
|
|
}
|
|
return $resultRedirect;
|
|
}
|
|
}
|