示例#1
0
文件: Stock.php 项目: kid17/magento2
 /**
  * @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);
 }
示例#2
0
 /**
  * @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;
 }