Example #1
0
 /**
  * @param Context $context
  * @param array $data
  * @param Product $product
  * @param Category $category
  */
 public function __construct(\Magento\Catalog\Block\Product\Context $context, Product $product, Category $category, array $data = [])
 {
     $this->Product = $product;
     $this->Category = $category;
     $this->reviewRenderer = $context->getReviewRenderer();
     $this->imageHelper = $context->getImageHelper();
     parent::__construct($context, $data);
 }
 /**
  * @param Context $context
  * @param array $data
  */
 public function __construct(\Magento\Catalog\Block\Product\Context $context, array $data = [])
 {
     $this->_imageHelper = $context->getImageHelper();
     $this->imageBuilder = $context->getImageBuilder();
     $this->_compareProduct = $context->getCompareProduct();
     $this->_wishlistHelper = $context->getWishlistHelper();
     $this->_cartHelper = $context->getCartHelper();
     $this->_catalogConfig = $context->getCatalogConfig();
     $this->_coreRegistry = $context->getRegistry();
     $this->_taxData = $context->getTaxData();
     $this->_mathRandom = $context->getMathRandom();
     $this->reviewRenderer = $context->getReviewRenderer();
     $this->stockRegistry = $context->getStockRegistry();
     parent::__construct($context, $data);
 }