mirror of
https://github.com/bdnugget/magento2.git
synced 2026-11-08 01:37:36 +00:00
- removed @since 2.0.0 as it is a base release - updated version in @since and @deprecated tag taking into account all patch releases
55 lines
1.4 KiB
PHP
55 lines
1.4 KiB
PHP
<?php
|
|
/**
|
|
* Copyright © Magento, Inc. All rights reserved.
|
|
* See COPYING.txt for license details.
|
|
*/
|
|
namespace Magento\Sales\Controller\Adminhtml\Order;
|
|
|
|
/**
|
|
* Order status management controller
|
|
*/
|
|
abstract class Status extends \Magento\Backend\App\Action
|
|
{
|
|
/**
|
|
* Authorization level of a basic admin session
|
|
*
|
|
* @see _isAllowed()
|
|
*/
|
|
const ADMIN_RESOURCE = 'Magento_Sales::order_statuses';
|
|
|
|
/**
|
|
* Core registry
|
|
*
|
|
* @var \Magento\Framework\Registry
|
|
*/
|
|
protected $_coreRegistry = null;
|
|
|
|
/**
|
|
* @param \Magento\Backend\App\Action\Context $context
|
|
* @param \Magento\Framework\Registry $coreRegistry
|
|
*/
|
|
public function __construct(
|
|
\Magento\Backend\App\Action\Context $context,
|
|
\Magento\Framework\Registry $coreRegistry
|
|
) {
|
|
$this->_coreRegistry = $coreRegistry;
|
|
parent::__construct($context);
|
|
}
|
|
|
|
/**
|
|
* Initialize status model based on status code in request
|
|
*
|
|
* @return \Magento\Sales\Model\Order\Status|false
|
|
*/
|
|
protected function _initStatus()
|
|
{
|
|
$statusCode = $this->getRequest()->getParam('status');
|
|
if ($statusCode) {
|
|
$status = $this->_objectManager->create(\Magento\Sales\Model\Order\Status::class)->load($statusCode);
|
|
} else {
|
|
$status = false;
|
|
}
|
|
return $status;
|
|
}
|
|
}
|