/**
  * @param ProductRepositoryInterface $productRepository
  * @param SearchCriteriaBuilder $searchCriteriaBuilder
  * @param FilterBuilder $filterBuilder
  * @param \Magento\Catalog\Block\Product\Context|Context $context
  * @param \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollectionFactory
  * @param \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility
  * @param \Magento\Framework\App\Http\Context $httpContext
  * @param \Magento\Rule\Model\Condition\Sql\Builder $sqlBuilder
  * @param \Magento\CatalogWidget\Model\Rule $rule
  * @param \Magento\Widget\Helper\Conditions $conditionsHelper
  * @param CustomerSession $customerSession
  * @param array $data
  */
 public function __construct(ProductRepositoryInterface $productRepository, SearchCriteriaBuilder $searchCriteriaBuilder, FilterBuilder $filterBuilder, Context $context, ProductCollectionFactory $productCollectionFactory, Visibility $catalogProductVisibility, HttpContext $httpContext, Builder $sqlBuilder, Rule $rule, Conditions $conditionsHelper, CustomerSession $customerSession, array $data = [])
 {
     parent::__construct($context, $productCollectionFactory, $catalogProductVisibility, $httpContext, $sqlBuilder, $rule, $conditionsHelper, $data);
     $this->productRepository = $productRepository;
     $this->searchCriteriaBuilder = $searchCriteriaBuilder;
     $this->filterBuilder = $filterBuilder;
     $this->_customerSession = $customerSession;
 }
Esempio n. 2
0
 /**
  * {@inheritdoc}
  */
 public function getImage($product, $imageId, $attributes = array())
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getImage');
     if (!$pluginInfo) {
         return parent::getImage($product, $imageId, $attributes);
     } else {
         return $this->___callPlugins('getImage', func_get_args(), $pluginInfo);
     }
 }
Esempio n. 3
0
 public function testScope()
 {
     $this->assertFalse($this->productsList->isScopePrivate());
 }
Esempio n. 4
0
 public function testGetNonDefaultTitle()
 {
     $this->productsList->setTitle('Custom Title');
     $this->assertEquals('Custom Title', $this->productsList->getTitle());
 }
 /**
  * Render block HTML
  *
  * @return string
  */
 protected function _toHtml()
 {
     if ($this->getRecommendedSkus() && !empty($this->getRecommendedSkus())) {
         return parent::_toHtml();
     }
 }
 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, \Magento\Rule\Model\Condition\Sql\Builder $sqlBuilder, \Magento\CatalogWidget\Model\Rule $rule, \Magento\Widget\Helper\Conditions $conditionsHelper, array $data = [])
 {
     parent::__construct($context, $productCollectionFactory, $catalogProductVisibility, $httpContext, $sqlBuilder, $rule, $conditionsHelper, $data);
 }
 /**
  * {@inheritdoc}
  */
 public function offsetGet($offset)
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'offsetGet');
     if (!$pluginInfo) {
         return parent::offsetGet($offset);
     } else {
         return $this->___callPlugins('offsetGet', func_get_args(), $pluginInfo);
     }
 }