PHP Class Smile\ElasticsuiteCatalog\Model\ResourceModel\Category\Fulltext\Collection

Basically a copy-pasted version of @see Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection
Author: Romain Ruaud ([email protected])
Inheritance: extends Magento\Catalog\Model\ResourceModel\Category\Collection
Afficher le fichier Open project: smile-sa/elasticsuite

Méthodes publiques

Méthode Description
__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}

Méthodes protégées

Méthode Description
_afterLoad ( )
_renderFiltersBefore ( )

Private Methods

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

Method Details

__construct() public méthode

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

protected _afterLoad ( )

_renderFiltersBefore() protected méthode

protected _renderFiltersBefore ( )

addAttributeToSort() public méthode

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

addFacet() public méthode

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.
Résultat Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection

addFieldToFilter() public méthode

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

addQueryFilter() public méthode

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() public méthode

Add search query filter
public addSearchFilter ( string $query ) : Collection
$query string Search query text.
Résultat Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection

getFacetedData() public méthode

Return field faceted data from faceted search result.
public getFacetedData ( string $field ) : array
$field string Facet field.
Résultat array

getSize() public méthode

{@inheritDoc}
public getSize ( )

isSpellchecked() public méthode

Indicates if the collection is spellchecked or not.
public isSpellchecked ( ) : boolean
Résultat boolean

setOrder() public méthode

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