PHP Class Smile\ElasticsuiteCatalogRule\Model\Rule\Condition\Product\AttributeList

Author: Aurelien FOUCRET ([email protected])
Mostrar archivo Open project: smile-sa/elasticsuite Class Usage Examples

Public Methods

Method Description
__construct ( Magento\Catalog\Model\ResourceModel\Product\Attribute\CollectionFactory $attributeCollectionFactory, Magento\Store\Model\StoreManagerInterface $storeManager, Smile\ElasticsuiteCore\Api\Index\IndexOperationInterface $indexManager, Mapping $mappingHelper, string $indexName = 'catalog_product', string $typeName = 'product' ) Constructor.
getAttributeCollection ( ) : Magento\Catalog\Model\ResourceModel\Product\Attribute\Collection Retrieve attribute collection prefiltered with only attribute usable in rules.
getField ( string $attributeName ) : Smile\ElasticsuiteCore\Api\Index\Mapping\FieldInterface Retrieve the mapping field for the rule attribute.

Private Methods

Method Description
getMapping ( ) : Smile\ElasticsuiteCore\Api\Index\MappingInterface Retrieve the search engine mapping.

Method Details

__construct() public method

Constructor.
public __construct ( Magento\Catalog\Model\ResourceModel\Product\Attribute\CollectionFactory $attributeCollectionFactory, Magento\Store\Model\StoreManagerInterface $storeManager, Smile\ElasticsuiteCore\Api\Index\IndexOperationInterface $indexManager, Mapping $mappingHelper, string $indexName = 'catalog_product', string $typeName = 'product' )
$attributeCollectionFactory Magento\Catalog\Model\ResourceModel\Product\Attribute\CollectionFactory Product attribute collection factory.
$storeManager Magento\Store\Model\StoreManagerInterface Store manager.
$indexManager Smile\ElasticsuiteCore\Api\Index\IndexOperationInterface Search engine index manager.
$mappingHelper Smile\ElasticsuiteCore\Helper\Mapping Mapping helper.
$indexName string Search engine index name.
$typeName string Search engine type name.

getAttributeCollection() public method

Retrieve attribute collection prefiltered with only attribute usable in rules.
public getAttributeCollection ( ) : Magento\Catalog\Model\ResourceModel\Product\Attribute\Collection
return Magento\Catalog\Model\ResourceModel\Product\Attribute\Collection

getField() public method

Retrieve the mapping field for the rule attribute.
public getField ( string $attributeName ) : Smile\ElasticsuiteCore\Api\Index\Mapping\FieldInterface
$attributeName string Attribute code.
return Smile\ElasticsuiteCore\Api\Index\Mapping\FieldInterface