PHP Класс Smile\ElasticsuiteCatalog\Model\ResourceModel\Category\Fulltext\Collection

Basically a copy-pasted version of @see Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection
Автор: Romain Ruaud ([email protected])
Наследование: extends Magento\Catalog\Model\ResourceModel\Category\Collection
Показать файл Открыть проект

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

Метод Описание
__construct ( Magento\Framework\Data\Collection\EntityFactory $entityFactory, Psr\Log\LoggerInterface $logger, Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, Magento\Framework\Event\ManagerInterface $eventManager, Magento\Eav\Model\Config $eavConfig, Magento\Framework\App\ResourceConnection $resource, Magento\Eav\Model\EntityFactory $eavEntityFactory, Magento\Eav\Model\ResourceModel\Helper $resourceHelper, Magento\Framework\Validator\UniversalFactory $universalFactory, Magento\Store\Model\StoreManagerInterface $storeManager, Smile\ElasticsuiteCore\Search\Request\Builder $requestBuilder, Magento\Search\Model\SearchEngine $searchEngine, Magento\Framework\DB\Adapter\AdapterInterface $connection = null, string $searchRequestName = 'category_search_container' ) Collection constructor.
addAttributeToSort ( $attribute, $dir = self::SORT_ORDER_ASC ) {@inheritDoc}
addFacet ( string $field, string $facetType, array $facetConfig, array $facetFilter = null ) : Collection Append a facet to the collection
addFieldToFilter ( $field, $condition = null ) {@inheritDoc}
addQueryFilter ( Smile\ElasticsuiteCore\Search\Request\QueryInterface $queryFilter ) Append a prebuilt (QueryInterface) query filter to the collection.
addSearchFilter ( string $query ) : Collection Add search query filter
getFacetedData ( string $field ) : array Return field faceted data from faceted search result.
getSize ( ) {@inheritDoc}
isSpellchecked ( ) : boolean Indicates if the collection is spellchecked or not.
setOrder ( $attribute, $dir = self::SORT_ORDER_DESC ) {@inheritDoc}

Защищенные методы

Метод Описание
_afterLoad ( )
_renderFiltersBefore ( )

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

Метод Описание
loadItemCounts ( ) : void Load items count : - collection size
prepareRequest ( ) : Smile\ElasticsuiteCore\Search\RequestInterface Prepare the search request before it will be executed.
prepareSortOrders ( ) : array() Prepare sort orders for the request builder.

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

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

Collection constructor.
public __construct ( Magento\Framework\Data\Collection\EntityFactory $entityFactory, Psr\Log\LoggerInterface $logger, Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, Magento\Framework\Event\ManagerInterface $eventManager, Magento\Eav\Model\Config $eavConfig, Magento\Framework\App\ResourceConnection $resource, Magento\Eav\Model\EntityFactory $eavEntityFactory, Magento\Eav\Model\ResourceModel\Helper $resourceHelper, Magento\Framework\Validator\UniversalFactory $universalFactory, Magento\Store\Model\StoreManagerInterface $storeManager, Smile\ElasticsuiteCore\Search\Request\Builder $requestBuilder, Magento\Search\Model\SearchEngine $searchEngine, Magento\Framework\DB\Adapter\AdapterInterface $connection = null, string $searchRequestName = 'category_search_container' )
$entityFactory Magento\Framework\Data\Collection\EntityFactory The Entity Factory
$logger Psr\Log\LoggerInterface The Logger
$fetchStrategy Magento\Framework\Data\Collection\Db\FetchStrategyInterface Fetch Strategy
$eventManager Magento\Framework\Event\ManagerInterface Event Manager
$eavConfig Magento\Eav\Model\Config EAV Configuration
$resource Magento\Framework\App\ResourceConnection Resource Connection
$eavEntityFactory Magento\Eav\Model\EntityFactory Entity Factory
$resourceHelper Magento\Eav\Model\ResourceModel\Helper Resource Helper
$universalFactory Magento\Framework\Validator\UniversalFactory Universal Factory
$storeManager Magento\Store\Model\StoreManagerInterface Store Manager
$requestBuilder Smile\ElasticsuiteCore\Search\Request\Builder Search request builder.
$searchEngine Magento\Search\Model\SearchEngine Search engine
$connection Magento\Framework\DB\Adapter\AdapterInterface Db Connection.
$searchRequestName string Search request name.

_afterLoad() защищенный Метод

protected _afterLoad ( )

_renderFiltersBefore() защищенный Метод

protected _renderFiltersBefore ( )

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

{@inheritDoc}
public addAttributeToSort ( $attribute, $dir = self::SORT_ORDER_ASC )

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

Append a facet to the collection
public addFacet ( string $field, string $facetType, array $facetConfig, array $facetFilter = null ) : Collection
$field string Facet field.
$facetType string Facet type.
$facetConfig array Facet config params.
$facetFilter array Facet filter.
Результат Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection

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

{@inheritDoc}
public addFieldToFilter ( $field, $condition = null )

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

Append a prebuilt (QueryInterface) query filter to the collection.
public addQueryFilter ( Smile\ElasticsuiteCore\Search\Request\QueryInterface $queryFilter )
$queryFilter Smile\ElasticsuiteCore\Search\Request\QueryInterface Query filter.

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

Add search query filter
public addSearchFilter ( string $query ) : Collection
$query string Search query text.
Результат Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection

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

Return field faceted data from faceted search result.
public getFacetedData ( string $field ) : array
$field string Facet field.
Результат array

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

{@inheritDoc}
public getSize ( )

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

Indicates if the collection is spellchecked or not.
public isSpellchecked ( ) : boolean
Результат boolean

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

{@inheritDoc}
public setOrder ( $attribute, $dir = self::SORT_ORDER_DESC )