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

Author: Romain Ruaud ([email protected])
Inheritance: implements Magento\Search\Model\Autocomplete\DataProviderInterface
ファイルを表示 Open project: smile-sa/elasticsuite

Protected Properties

Property Type Description
$categoryCollectionFactory Smile\ElasticsuiteCatalog\Model\ResourceModel\Category\Fulltext\CollectionFactory
$configurationHelper Smile\ElasticsuiteCatalog\Helper\Autocomplete
$itemFactory ItemFactory Autocomplete result item factory
$queryFactory Magento\Search\Model\QueryFactory Query factory
$termDataProvider Smile\ElasticsuiteCore\Model\Autocomplete\Terms\DataProvider

Public Methods

Method Description
__construct ( ItemFactory $itemFactory, Magento\Search\Model\QueryFactory $queryFactory, DataProvider $termDataProvider, Smile\ElasticsuiteCatalog\Model\ResourceModel\Category\Fulltext\CollectionFactory $categoryCollectionFactory, Autocomplete $configurationHelper, string $type = self::AUTOCOMPLETE_TYPE ) Constructor.
getItems ( ) {@inheritDoc}
getType ( ) : string

Private Methods

Method Description
getCategoryCollection ( ) : Collection | null Suggested categories collection.
getResultsPageSize ( ) : integer Retrieve number of categories to display in autocomplete results
getSuggestedTerms ( ) : array List of search terms suggested by the search terms data provider.

Method Details

__construct() public method

Constructor.
public __construct ( ItemFactory $itemFactory, Magento\Search\Model\QueryFactory $queryFactory, DataProvider $termDataProvider, Smile\ElasticsuiteCatalog\Model\ResourceModel\Category\Fulltext\CollectionFactory $categoryCollectionFactory, 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.
$categoryCollectionFactory Smile\ElasticsuiteCatalog\Model\ResourceModel\Category\Fulltext\CollectionFactory Category collection factory.
$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

Property Details

$categoryCollectionFactory protected_oe property

protected CollectionFactory,Smile\ElasticsuiteCatalog\Model\ResourceModel\Category\Fulltext $categoryCollectionFactory
return Smile\ElasticsuiteCatalog\Model\ResourceModel\Category\Fulltext\CollectionFactory

$configurationHelper protected_oe property

protected Autocomplete,Smile\ElasticsuiteCatalog\Helper $configurationHelper
return Smile\ElasticsuiteCatalog\Helper\Autocomplete

$itemFactory protected_oe property

Autocomplete result item factory
protected ItemFactory,Smile\ElasticsuiteCatalog\Model\Autocomplete\Category $itemFactory
return ItemFactory

$queryFactory protected_oe property

Query factory
protected QueryFactory,Magento\Search\Model $queryFactory
return Magento\Search\Model\QueryFactory

$termDataProvider protected_oe property

protected DataProvider,Smile\ElasticsuiteCore\Model\Autocomplete\Terms $termDataProvider
return Smile\ElasticsuiteCore\Model\Autocomplete\Terms\DataProvider