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

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

Méthodes publiques

Méthode 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

Méthode 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 méthode

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 méthode

{@inheritDoc}
public getItems ( )

getType() public méthode

public getType ( ) : string
Résultat string