Метод | Описание | |
---|---|---|
__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\Catalog\Model\ResourceModel\Helper $resourceHelper, Magento\Framework\Validator\UniversalFactory $universalFactory, Magento\Store\Model\StoreManagerInterface $storeManager, Magento\Framework\Module\Manager $moduleManager, Magento\Catalog\Model\Indexer\Product\Flat\State $catalogProductFlatState, Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, Magento\Catalog\Model\Product\OptionFactory $productOptionFactory, Magento\Catalog\Model\ResourceModel\Url $catalogUrl, Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, Magento\Customer\Model\Session $customerSession, Magento\Framework\Stdlib\DateTime $dateTime, Magento\Customer\Api\GroupManagementInterface $groupManagement, Smile\ElasticsuiteCore\Search\Request\Builder $requestBuilder, Magento\Search\Model\SearchEngine $searchEngine, Magento\Framework\DB\Adapter\AdapterInterface $connection = null, string $searchRequestName = 'catalog_view_container' ) | Constructor. | |
addAttributeToSort ( $attribute, $dir = self::SORT_ORDER_ASC ) | {@inheritDoc} | |
addCategoryFilter ( Magento\Catalog\Model\Category $category ) | {@inheritDoc} | |
addFacet ( string $field, string $facetType, array $facetConfig, array $facetFilter = null ) : |
Append a facet to the collection | |
addFieldToFilter ( $field, $condition = null ) | {@inheritDoc} | |
addIsInStockFilter ( ) : |
Filter in stock product. | |
addQueryFilter ( Smile\ElasticsuiteCore\Search\Request\QueryInterface $queryFilter ) | Append a prebuilt (QueryInterface) query filter to the collection. | |
addSearchFilter ( string $query ) : |
Add search query filter | |
addSortFilterParameters ( string $sortName, string $sortField, string $nestedPath = null, array $nestedFilter = null ) : |
Set param for a sort order. | |
getFacetedData ( string $field ) : array | Return field faceted data from faceted search result. | |
getProductCountByAttributeSetId ( ) : array | Load the product count by attribute set id. | |
getSize ( ) | {@inheritDoc} | |
isSpellchecked ( ) : boolean | Indicates if the collection is spellchecked or not. | |
setOrder ( $attribute, $dir = self::SORT_ORDER_DESC ) | {@inheritDoc} | |
setVisibility ( $visibility ) | {@inheritDoc} |
Метод | Описание | |
---|---|---|
_afterLoad ( ) | ||
_renderFilters ( ) | ||
_renderFiltersBefore ( ) | ||
_renderOrders ( ) |
Метод | Описание | |
---|---|---|
loadProductCounts ( ) : void | Load product count : - collection size - number of products by attribute set | |
mapFieldName ( string $fieldName ) : string | Convert standard field name to ES fieldname. | |
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\Catalog\Model\ResourceModel\Helper $resourceHelper, Magento\Framework\Validator\UniversalFactory $universalFactory, Magento\Store\Model\StoreManagerInterface $storeManager, Magento\Framework\Module\Manager $moduleManager, Magento\Catalog\Model\Indexer\Product\Flat\State $catalogProductFlatState, Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, Magento\Catalog\Model\Product\OptionFactory $productOptionFactory, Magento\Catalog\Model\ResourceModel\Url $catalogUrl, Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, Magento\Customer\Model\Session $customerSession, Magento\Framework\Stdlib\DateTime $dateTime, Magento\Customer\Api\GroupManagementInterface $groupManagement, Smile\ElasticsuiteCore\Search\Request\Builder $requestBuilder, Magento\Search\Model\SearchEngine $searchEngine, Magento\Framework\DB\Adapter\AdapterInterface $connection = null, string $searchRequestName = 'catalog_view_container' ) | ||
$entityFactory | Magento\Framework\Data\Collection\EntityFactory | Collection entity factory |
$logger | Psr\Log\LoggerInterface | Logger. |
$fetchStrategy | Magento\Framework\Data\Collection\Db\FetchStrategyInterface | Db Fetch strategy. |
$eventManager | Magento\Framework\Event\ManagerInterface | Event manager. |
$eavConfig | Magento\Eav\Model\Config | EAV configuration. |
$resource | Magento\Framework\App\ResourceConnection | DB connection. |
$eavEntityFactory | Magento\Eav\Model\EntityFactory | Entity factory. |
$resourceHelper | Magento\Catalog\Model\ResourceModel\Helper | Resource helper. |
$universalFactory | Magento\Framework\Validator\UniversalFactory | Standard factory. |
$storeManager | Magento\Store\Model\StoreManagerInterface | Store manager. |
$moduleManager | Magento\Framework\Module\Manager | Module manager. |
$catalogProductFlatState | Magento\Catalog\Model\Indexer\Product\Flat\State | Flat index state. |
$scopeConfig | Magento\Framework\App\Config\ScopeConfigInterface | Store configuration. |
$productOptionFactory | Magento\Catalog\Model\Product\OptionFactory | Product options factory. |
$catalogUrl | Magento\Catalog\Model\ResourceModel\Url | Catalog URL resource model. |
$localeDate | Magento\Framework\Stdlib\DateTime\TimezoneInterface | Timezone helper. |
$customerSession | Magento\Customer\Model\Session | Customer session. |
$dateTime | Magento\Framework\Stdlib\DateTime | Datetime helper. |
$groupManagement | Magento\Customer\Api\GroupManagementInterface | Customer group 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 addCategoryFilter ( Magento\Catalog\Model\Category $category ) | ||
$category | Magento\Catalog\Model\Category |
public addFieldToFilter ( $field, $condition = null ) |
public addIsInStockFilter ( ) : |
||
Результат |
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. |
Результат |
public addSortFilterParameters ( string $sortName, string $sortField, string $nestedPath = null, array $nestedFilter = null ) : |
||
$sortName | string | Sort order name (eg. position, ...). |
$sortField | string | Sort field. |
$nestedPath | string | Optional nested path for the sort field. |
$nestedFilter | array | Optional nested filter for the sort field. |
Результат |
public getFacetedData ( string $field ) : array | ||
$field | string | Facet field. |
Результат | array |
public getProductCountByAttributeSetId ( ) : array | ||
Результат | array |
public isSpellchecked ( ) : boolean | ||
Результат | boolean |
public setOrder ( $attribute, $dir = self::SORT_ORDER_DESC ) |