PHP Class Smile\ElasticsuiteCatalog\Helper\Autocomplete

Author: Romain Ruaud ([email protected])
Inheritance: extends Smile\ElasticsuiteCore\Helper\Autocomplete
Exibir arquivo Open project: smile-sa/elasticsuite Class Usage Examples

Public Methods

Method Description
__construct ( Magento\Framework\App\Helper\Context $context, Magento\Store\Model\StoreManagerInterface $storeManager, Magento\CatalogInventory\Api\StockConfigurationInterface $stockConfiguration, Mapping $mappingHelper ) Constructor.
getAttributeAutocompleteField ( Magento\Catalog\Api\Data\ProductAttributeInterface $attribute ) : string ES field used in attribute autocomplete.
isShowOutOfStock ( integer $storeId = null ) : boolean Check if Stock configuration allows to display out of stock products

Method Details

__construct() public method

Constructor.
public __construct ( Magento\Framework\App\Helper\Context $context, Magento\Store\Model\StoreManagerInterface $storeManager, Magento\CatalogInventory\Api\StockConfigurationInterface $stockConfiguration, Mapping $mappingHelper )
$context Magento\Framework\App\Helper\Context Helper context.
$storeManager Magento\Store\Model\StoreManagerInterface Store manager.
$stockConfiguration Magento\CatalogInventory\Api\StockConfigurationInterface Stock Configuration Interface.
$mappingHelper Smile\ElasticsuiteCore\Helper\Mapping Mapping helper.

getAttributeAutocompleteField() public method

ES field used in attribute autocomplete.
public getAttributeAutocompleteField ( Magento\Catalog\Api\Data\ProductAttributeInterface $attribute ) : string
$attribute Magento\Catalog\Api\Data\ProductAttributeInterface Attribute.
return string

isShowOutOfStock() public method

Check if Stock configuration allows to display out of stock products
public isShowOutOfStock ( integer $storeId = null ) : boolean
$storeId integer The store Id. Will use current store if null.
return boolean