/** * @param \Magento\Framework\App\Action\Context $context * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Catalog\Api\ProductRepositoryInterface $productRepository */ public function __construct(Context $context, CustomerSession $customerSession, ProductRepositoryInterface $productRepository) { $this->productRepository = $productRepository; parent::__construct($context, $customerSession); }
/** * @param \Magento\Framework\App\Action\Context $context * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Catalog\Api\ProductRepositoryInterface $productRepository */ public function __construct(\Magento\Framework\App\Action\Context $context, \Magento\Customer\Model\Session $customerSession, \Magento\Catalog\Api\ProductRepositoryInterface $productRepository) { parent::__construct($context, $customerSession); $this->productRepository = $productRepository; }