PHP Class Smile\ElasticsuiteVirtualCategory\Plugin\Catalog\Category\DataProviderPlugin

Author: Aurelien FOUCRET ([email protected])
Show file Open project: smile-sa/elasticsuite

Public Methods

Method Description
__construct ( Position $productPositionResource, Magento\Framework\Locale\FormatInterface $localeFormat, Magento\Backend\Model\UrlInterface $urlBuilder, Magento\Store\Model\StoreManagerInterface $storeManagerInterface ) Constructor.
aroundGetData ( Magento\Catalog\Model\Category\DataProvider $dataProvider, Closure $proceed ) : array Append virtual rule and sorting product data.

Private Methods

Method Description
getProductSavedPositions ( Magento\Catalog\Model\Category $category ) : array Load product saved positions for the current category.
getProductSorterLoadUrl ( Magento\Catalog\Model\Category $category ) : string Retrieve the category product sorter load URL.

Method Details

__construct() public method

Constructor.
public __construct ( Position $productPositionResource, Magento\Framework\Locale\FormatInterface $localeFormat, Magento\Backend\Model\UrlInterface $urlBuilder, Magento\Store\Model\StoreManagerInterface $storeManagerInterface )
$productPositionResource Smile\ElasticsuiteVirtualCategory\Model\ResourceModel\Category\Product\Position Product position resource model.
$localeFormat Magento\Framework\Locale\FormatInterface Locale formater.
$urlBuilder Magento\Backend\Model\UrlInterface Admin URL Builder.
$storeManagerInterface Magento\Store\Model\StoreManagerInterface Store Manager.

aroundGetData() public method

Append virtual rule and sorting product data.
public aroundGetData ( Magento\Catalog\Model\Category\DataProvider $dataProvider, Closure $proceed ) : array
$dataProvider Magento\Catalog\Model\Category\DataProvider Data provider.
$proceed Closure Original method.
return array