PHP Класс Smile\ElasticsuiteCatalog\Model\Autocomplete\Product\Attribute\DataProvider

Автор: Aurelien FOUCRET ([email protected])
Наследование: implements Magento\Search\Model\Autocomplete\DataProviderInterface
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( ItemFactory $itemFactory, Collection $productCollection, Magento\Catalog\Model\ResourceModel\Product\Attribute\CollectionFactory $attributeCollectionFactory, Autocomplete $autocompleteHelper, Magento\Store\Model\StoreManagerInterface $storeManager, string $type = self::AUTOCOMPLETE_TYPE ) Constructor.
getItems ( ) {@inheritDoc}
getType ( ) : string Returns autocomplete type.

Приватные методы

Метод Описание
getFilterField ( Magento\Catalog\Model\ResourceModel\Product\Attribute $attribute ) : string Get filter field for an attribute.
getResultsPageSize ( ) : integer Retrieve number of products to display in autocomplete results
loadAttributeCollection ( ) : DataProvider Load the attributes displayed in the suggest.
prepareProductCollection ( ) : DataProvider Append facets used to select suggested attributes.
resultSorterCallback ( Magento\Search\Model\Autocomplete\Item $item1, Magento\Search\Model\Autocomplete\Item $item2 ) : integer Sort autocomplete items by result count.

Описание методов

__construct() публичный Метод

Constructor.
public __construct ( ItemFactory $itemFactory, Collection $productCollection, Magento\Catalog\Model\ResourceModel\Product\Attribute\CollectionFactory $attributeCollectionFactory, Autocomplete $autocompleteHelper, Magento\Store\Model\StoreManagerInterface $storeManager, string $type = self::AUTOCOMPLETE_TYPE )
$itemFactory ItemFactory Autocomplete item factory.
$productCollection Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection Autocomplete product collection.
$attributeCollectionFactory Magento\Catalog\Model\ResourceModel\Product\Attribute\CollectionFactory Product attribute collection factory.
$autocompleteHelper Smile\ElasticsuiteCatalog\Helper\Autocomplete Autocomplete configuration helper.
$storeManager Magento\Store\Model\StoreManagerInterface Store manager.
$type string Autocomplete type code.

getItems() публичный Метод

{@inheritDoc}
public getItems ( )

getType() публичный Метод

Returns autocomplete type.
public getType ( ) : string
Результат string