_coreRegistry = $registry; parent::__construct($context, $jsonEncoder, $authSession, $data); } /** * Retrieve available order * * @return \Magento\Sales\Model\Order * @throws \Magento\Framework\Exception\LocalizedException */ public function getOrder() { if ($this->hasOrder()) { return $this->getData('order'); } if ($this->_coreRegistry->registry('current_order')) { return $this->_coreRegistry->registry('current_order'); } if ($this->_coreRegistry->registry('order')) { return $this->_coreRegistry->registry('order'); } throw new \Magento\Framework\Exception\LocalizedException(__('We can\'t get the order instance right now.')); } /** * Constructor * * @return void */ protected function _construct() { parent::_construct(); $this->setId('sales_order_view_tabs'); $this->setDestElementId('sales_order_view'); $this->setTitle(__('Order View')); } }