PHP Class Smile\ElasticsuiteCatalog\Model\Autocomplete\Product\DataProvider

Author: Aurelien FOUCRET ([email protected])
Inheritance: implements Magento\Search\Model\Autocomplete\DataProviderInterface
Datei anzeigen Open project: smile-sa/elasticsuite

Public Methods

Method Description
__construct ( ItemFactory $itemFactory, Magento\Search\Model\QueryFactory $queryFactory, DataProvider $termDataProvider, Collection $productCollection, Autocomplete $configurationHelper, string $type = self::AUTOCOMPLETE_TYPE ) Constructor.
getItems ( ) {@inheritDoc}
getType ( ) : string

Private Methods

Method Description
getQueryText ( ) : array List of search terms suggested by the search terms data daprovider.
getResultsPageSize ( ) : integer Retrieve number of products to display in autocomplete results
prepareProductCollection ( ) : Smile\ElasticsuiteCatalog\Model\Autocomplete\Product Init suggested products collection.

Method Details

__construct() public method

Constructor.
public __construct ( ItemFactory $itemFactory, Magento\Search\Model\QueryFactory $queryFactory, DataProvider $termDataProvider, Collection $productCollection, Autocomplete $configurationHelper, string $type = self::AUTOCOMPLETE_TYPE )
$itemFactory ItemFactory Suggest item factory.
$queryFactory Magento\Search\Model\QueryFactory Search query factory.
$termDataProvider Smile\ElasticsuiteCore\Model\Autocomplete\Terms\DataProvider Search terms suggester.
$productCollection Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection Product collection.
$configurationHelper Smile\ElasticsuiteCatalog\Helper\Autocomplete Autocomplete configuration helper.
$type string Autocomplete provider type.

getItems() public method

{@inheritDoc}
public getItems ( )

getType() public method

public getType ( ) : string
return string