Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Other.php
Go to the documentation of this file.
1 <?php
7 
15 {
19  protected $_registry;
20 
26  public function __construct(
27  \Magento\Framework\View\Element\Template\Context $context,
28  \Magento\Framework\Registry $registry,
29  array $data = []
30  ) {
31  $this->_registry = $registry;
32  parent::__construct($context, $data);
33  }
34 
40  public function getProduct()
41  {
42  return $this->_registry->registry('product');
43  }
44 }
__construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\Framework\Registry $registry, array $data=[])
Definition: Other.php:26