/**
  * @param Context $context
  * @param \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory
  * @param \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility
  * @param \Magento\Framework\App\Http\Context $httpContext
  * @param array $data
  */
 public function __construct(\Magento\Catalog\Block\Product\Context $context, \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory, \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility, \Magento\Framework\App\Http\Context $httpContext, array $data = [])
 {
     $this->_productCollectionFactory = $productCollectionFactory;
     $this->_catalogProductVisibility = $catalogProductVisibility;
     $this->httpContext = $httpContext;
     $this->_imageHelper = $context->getImageHelper();
     $this->_cartHelper = $context->getCartHelper();
     parent::__construct($context, $data);
 }
 /**
  * @param Context $context
  * @param \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory
  * @param \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility
  * @param \Magento\Framework\App\Http\Context $httpContext
  * @param array $data
  */
 public function __construct(\Magento\Catalog\Block\Product\Context $context, \Magento\Reports\Model\ResourceModel\Report\Collection\Factory $resourceFactory, \Magento\Reports\Model\Grouped\CollectionFactory $collectionFactory, \Magento\Reports\Helper\Data $reportsData, array $data = [])
 {
     $this->_resourceFactory = $resourceFactory;
     $this->_collectionFactory = $collectionFactory;
     $this->_reportsData = $reportsData;
     $this->_imageHelper = $context->getImageHelper();
     $this->_cartHelper = $context->getCartHelper();
     parent::__construct($context, $data);
 }
 public function __construct(\Magento\Catalog\Block\Product\Context $context, \Magento\Framework\App\ObjectManagerFactory $objectManagerFactory, \Magento\Catalog\Model\CategoryFactory $categoryFactory, \Magento\Catalog\Model\Session $catalogSession, \Magento\Checkout\Model\Session $checkoutSession, array $data = [])
 {
     $this->_cartHelper = $context->getCartHelper();
     $this->_objectManagerFactory = $objectManagerFactory;
     $this->categoryFactory = $categoryFactory;
     $this->_catalogSession = $catalogSession;
     $this->_checkoutSession = $checkoutSession;
     parent::__construct($context, $data);
 }
Beispiel #4
0
 public function __construct(\Magento\Catalog\Block\Product\Context $context, \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory, \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility, \Magento\Framework\App\Http\Context $httpContext, \Emizentech\ShopByBrand\Model\BrandFactory $brandFactory, \Magento\Framework\View\Page\Config $pageConfig, array $data = [])
 {
     $this->_productCollectionFactory = $productCollectionFactory;
     $this->_catalogProductVisibility = $catalogProductVisibility;
     $this->httpContext = $httpContext;
     $this->_imageHelper = $context->getImageHelper();
     $this->_brandFactory = $brandFactory;
     $this->_cartHelper = $context->getCartHelper();
     $this->pageConfig = $pageConfig;
     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);
 }