Метод | Описание | |
---|---|---|
__construct ( Magento\Catalog\Api\Data\CategoryInterface $category, Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\CollectionFactory $productCollectionFactory, Smile\ElasticsuiteVirtualCategory\Model\Preview\ItemFactory $previewItemFactory, |
Constructor. | |
getData ( ) : array | Load preview data. |
Метод | Описание | |
---|---|---|
getAutomaticSortProductCollection ( ) : |
Return a collection with with products that match the category rules loaded. | |
getEntityIdFilterQuery ( array $ids ) : Smile\ElasticsuiteCore\Search\Request\QueryInterface | Create a product id filter query. | |
getManualSortProductCollection ( ) : |
Return a collection with all products manually sorted loaded. | |
getQueryFilter ( ) : Smile\ElasticsuiteCore\Search\Request\QueryInterface | Return the filter applied to the query. | |
getSortedProductIds ( ) : array | Return the list of sorted product ids. | |
loadItems ( Magento\Catalog\Model\ResourceModel\Product[] $products = [] ) : |
Convert an array of products to an array of preview items. |
public __construct ( Magento\Catalog\Api\Data\CategoryInterface $category, Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\CollectionFactory $productCollectionFactory, Smile\ElasticsuiteVirtualCategory\Model\Preview\ItemFactory $previewItemFactory, |
||
$category | Magento\Catalog\Api\Data\CategoryInterface | Category to preview. |
$productCollectionFactory | Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\CollectionFactory | Fulltext product collection factory. |
$previewItemFactory | Smile\ElasticsuiteVirtualCategory\Model\Preview\ItemFactory | Preview item factory. |
$queryFactory | QueryInterface factory. | |
$size | integer | Preview size. |