Пример #1
0
 /**
  * @param Context $context
  * @param \Magento\Customer\Model\Session $customerSession
  * @param \Magento\Store\Model\StoreManagerInterface $storeManager
  */
 public function __construct(Context $context, \Magento\Customer\Model\Session $customerSession, \Magento\Store\Model\StoreManagerInterface $storeManager)
 {
     $this->_storeManager = $storeManager;
     parent::__construct($context, $customerSession);
 }
Пример #2
0
 /**
  * @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);
 }
Пример #3
0
 /**
  * @param Context $context
  * @param \Magento\Customer\Model\Session $customerSession
  * @param \Magento\Store\Model\StoreManagerInterface $storeManager
  * @param \Magento\Catalog\Api\ProductRepositoryInterface $productRepository
  */
 public function __construct(Context $context, \Magento\Customer\Model\Session $customerSession, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Catalog\Api\ProductRepositoryInterface $productRepository)
 {
     parent::__construct($context, $customerSession);
     $this->_storeManager = $storeManager;
     $this->productRepository = $productRepository;
 }