47 \
Magento\Catalog\Model\Product\Visibility $productVisibility,
48 \
Magento\Reports\Model\Product\Index\Factory $indexFactory,
55 $this->_productVisibility = $productVisibility;
56 $this->_indexFactory = $indexFactory;
57 $this->_isScopePrivate =
true;
67 if ($this->
hasData(
'page_size')) {
68 return $this->
getData(
'page_size');
91 $model = $this->_indexFactory->get($this->_indexType);
92 }
catch (\InvalidArgumentException $e) {
93 throw new \Magento\Framework\Exception\LocalizedException(
__(
'Index type is not valid'));
107 $attributes = $this->_catalogConfig->getProductAttributes();
111 if ($this->getCustomerId()) {
112 $this->
_collection->setCustomerId($this->getCustomerId());
116 $this->
getModel()->getExcludeProductIds()
117 )->addUrlRewrite()->setPageSize(
126 $ids = $this->getProductIds();
132 $this->
_collection->setAddedAtOrder()->setVisibility($this->_productVisibility->getVisibleInSiteIds());
getData($key='', $index=null)
__construct(\Magento\Catalog\Block\Product\Context $context, \Magento\Catalog\Model\Product\Visibility $productVisibility, \Magento\Reports\Model\Product\Index\Factory $indexFactory, array $data=[])