Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Comments.php
Go to the documentation of this file.
1 <?php
13 
19 {
25  protected $_coreRegistry = null;
26 
32  public function __construct(
33  \Magento\Framework\View\Element\Context $context,
34  \Magento\Framework\Registry $registry,
35  array $data = []
36  ) {
37  $this->_coreRegistry = $registry;
38  parent::__construct($context, $data);
39  }
40 
46  public function getShipment()
47  {
48  return $this->_coreRegistry->registry('current_shipment');
49  }
50 
56  public function getOrder()
57  {
58  return $this->getShipment()->getOrder();
59  }
60 
66  public function getSource()
67  {
68  return $this->getShipment();
69  }
70 }
__construct(\Magento\Framework\View\Element\Context $context, \Magento\Framework\Registry $registry, array $data=[])
Definition: Comments.php:32