Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
View.php
Go to the documentation of this file.
1 <?php
7 
12 {
16  protected $_registry;
17 
23  protected $_helper;
24 
28  protected $coreHelper;
29 
37  public function __construct(
38  \Magento\Framework\View\Element\Template\Context $context,
39  \Magento\ProductAlert\Helper\Data $helper,
40  \Magento\Framework\Registry $registry,
41  \Magento\Framework\Data\Helper\PostHelper $coreHelper,
42  array $data = []
43  ) {
44  parent::__construct($context, $data);
45  $this->_registry = $registry;
46  $this->_helper = $helper;
47  $this->coreHelper = $coreHelper;
48  }
49 
55  protected function getProduct()
56  {
57  $product = $this->_registry->registry('current_product');
58  if ($product && $product->getId()) {
59  return $product;
60  }
61  return false;
62  }
63 
69  public function getPostAction()
70  {
71  return $this->coreHelper->getPostData($this->getSignupUrl());
72  }
73 }
$helper
Definition: iframe.phtml:13
__construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\ProductAlert\Helper\Data $helper, \Magento\Framework\Registry $registry, \Magento\Framework\Data\Helper\PostHelper $coreHelper, array $data=[])
Definition: View.php:37