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 ) : |
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 ) : |
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éthode | Description | |
---|---|---|
_afterLoad ( ) | ||
_renderFiltersBefore ( ) |
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. |
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. |
public addAttributeToSort ( $attribute, $dir = self::SORT_ORDER_ASC ) |
public addFacet ( string $field, string $facetType, array $facetConfig, array $facetFilter = null ) : |
||
$field | string | Facet field. |
$facetType | string | Facet type. |
$facetConfig | array | Facet config params. |
$facetFilter | array | Facet filter. |
Résultat |
public addFieldToFilter ( $field, $condition = null ) |
public addQueryFilter ( Smile\ElasticsuiteCore\Search\Request\QueryInterface $queryFilter ) | ||
$queryFilter | Smile\ElasticsuiteCore\Search\Request\QueryInterface | Query filter. |
public addSearchFilter ( string $query ) : |
||
$query | string | Search query text. |
Résultat |
public getFacetedData ( string $field ) : array | ||
$field | string | Facet field. |
Résultat | array |
public isSpellchecked ( ) : boolean | ||
Résultat | boolean |
public setOrder ( $attribute, $dir = self::SORT_ORDER_DESC ) |