PHP 클래스 Smile\ElasticsuiteCatalog\Block\Plugin\ResultPlugin

저자: Aurelien FOUCRET ([email protected])
파일 보기 프로젝트 열기: smile-sa/elasticsuite

보호된 프로퍼티들

프로퍼티 타입 설명
$catalogSearchData Magento\CatalogSearch\Helper\Data Catalog search data
$layer Magento\Catalog\Model\Layer
$queryFactory Magento\Search\Model\QueryFactory
$queryResource Smile\ElasticsuiteCatalog\Model\ResourceModel\Search\Query
$resultCount integer

공개 메소드들

메소드 설명
__construct ( Magento\Catalog\Model\Layer\Resolver $layerResolver, Magento\CatalogSearch\Helper\Data $catalogSearchData, Magento\Search\Model\QueryFactory $queryFactory, Query $queryResource ) Constructor.
aroundGetNoteMessages ( Magento\CatalogSearch\Block\Result $resultBlock, Closure $proceed ) : string[] Append the fuzziness alert message + save the search result count.
aroundGetResultCount ( Magento\CatalogSearch\Block\Result $resultBlock, Closure $proceed ) : integer Avoid the search result count to be saved by the original method.
aroundSetListOrders ( Magento\CatalogSearch\Block\Result $resultBlock, Closure $proceed ) : Magento\CatalogSearch\Block\Result Change default behavior of the search result block.

비공개 메소드들

메소드 설명
getProductCollection ( ) : Magento\Catalog\Model\ResourceModel\Product\Collection Return the current layer product collection.
isSpellcheck ( ) : boolean Indicates if the current search is spellchecked.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( Magento\Catalog\Model\Layer\Resolver $layerResolver, Magento\CatalogSearch\Helper\Data $catalogSearchData, Magento\Search\Model\QueryFactory $queryFactory, Query $queryResource )
$layerResolver Magento\Catalog\Model\Layer\Resolver Layer.
$catalogSearchData Magento\CatalogSearch\Helper\Data Catalog search helper.
$queryFactory Magento\Search\Model\QueryFactory Search query factory.
$queryResource Smile\ElasticsuiteCatalog\Model\ResourceModel\Search\Query Search query resource.

aroundGetNoteMessages() 공개 메소드

Append the fuzziness alert message + save the search result count.
public aroundGetNoteMessages ( Magento\CatalogSearch\Block\Result $resultBlock, Closure $proceed ) : string[]
$resultBlock Magento\CatalogSearch\Block\Result Result block.
$proceed Closure Original method.
리턴 string[]

aroundGetResultCount() 공개 메소드

Avoid the search result count to be saved by the original method.
public aroundGetResultCount ( Magento\CatalogSearch\Block\Result $resultBlock, Closure $proceed ) : integer
$resultBlock Magento\CatalogSearch\Block\Result Result block.
$proceed Closure Original method.
리턴 integer

aroundSetListOrders() 공개 메소드

Order has to be set to ASC and not DESC.
public aroundSetListOrders ( Magento\CatalogSearch\Block\Result $resultBlock, Closure $proceed ) : Magento\CatalogSearch\Block\Result
$resultBlock Magento\CatalogSearch\Block\Result Result block.
$proceed Closure Original method.
리턴 Magento\CatalogSearch\Block\Result

프로퍼티 상세

$catalogSearchData 보호되어 있는 프로퍼티

Catalog search data
protected Data,Magento\CatalogSearch\Helper $catalogSearchData
리턴 Magento\CatalogSearch\Helper\Data

$layer 보호되어 있는 프로퍼티

protected Layer,Magento\Catalog\Model $layer
리턴 Magento\Catalog\Model\Layer

$queryFactory 보호되어 있는 프로퍼티

protected QueryFactory,Magento\Search\Model $queryFactory
리턴 Magento\Search\Model\QueryFactory

$queryResource 보호되어 있는 프로퍼티

protected Query,Smile\ElasticsuiteCatalog\Model\ResourceModel\Search $queryResource
리턴 Smile\ElasticsuiteCatalog\Model\ResourceModel\Search\Query

$resultCount 보호되어 있는 프로퍼티

protected int $resultCount
리턴 integer