PHP Class Smile\ElasticsuiteCatalog\Model\Eav\Indexer\Fulltext\Datasource\AbstractAttributeData

Author: Romain Ruaud ([email protected])
显示文件 Open project: smile-sa/elasticsuite

Protected Properties

Property Type Description
$attributeHelper Smile\ElasticsuiteCatalog\Helper\Attribute
$attributeIdsByTable array
$attributesById array
$fieldFactory Smile\ElasticsuiteCore\Index\Mapping\FieldFactory
$fields array
$indexedBackendModels array
$resourceModel Smile\ElasticsuiteCatalog\Model\ResourceModel\Eav\Indexer\Fulltext\Datasource\AbstractAttributeData

Public Methods

Method Description
__construct ( AbstractAttributeData $resourceModel, Smile\ElasticsuiteCore\Index\Mapping\FieldFactory $fieldFactory, Attribute $attributeHelper, array $indexedBackendModels = [] ) Constructor
getFields ( ) List of fields generated from the attributes list.

Protected Methods

Method Description
loadAttributesRawData ( integer $storeId, array $entityIds, string $tableName, array $attributeIds ) : array Load attribute data from the database.

Private Methods

Method Description
canIndexAttribute ( Magento\Eav\Model\Entity\Attribute\AttributeInterface $attribute ) : boolean Check if an attribute can be indexed.
initAttributes ( ) : AbstractAttributeData Init attributes used into ES.
initField ( Magento\Eav\Model\Entity\Attribute\AttributeInterface $attribute ) : AbstractAttributeData Create a mapping field from an attribute.

Method Details

__construct() public method

Constructor
public __construct ( AbstractAttributeData $resourceModel, Smile\ElasticsuiteCore\Index\Mapping\FieldFactory $fieldFactory, Attribute $attributeHelper, array $indexedBackendModels = [] )
$resourceModel Smile\ElasticsuiteCatalog\Model\ResourceModel\Eav\Indexer\Fulltext\Datasource\AbstractAttributeData Resource model.
$fieldFactory Smile\ElasticsuiteCore\Index\Mapping\FieldFactory Mapping field factory.
$attributeHelper Smile\ElasticsuiteCatalog\Helper\Attribute Attribute helper.
$indexedBackendModels array List of indexed backend models added to the default list.

getFields() public method

This list is used to generate the catalog_product ES mapping. {@inheritdoc}
public getFields ( )

loadAttributesRawData() protected method

Load attribute data from the database.
protected loadAttributesRawData ( integer $storeId, array $entityIds, string $tableName, array $attributeIds ) : array
$storeId integer Store id.
$entityIds array Entity ids.
$tableName string Attribute table name.
$attributeIds array Loaded attribute ids.
return array

Property Details

$attributeHelper protected_oe property

protected Attribute,Smile\ElasticsuiteCatalog\Helper $attributeHelper
return Smile\ElasticsuiteCatalog\Helper\Attribute

$attributeIdsByTable protected_oe property

protected array $attributeIdsByTable
return array

$attributesById protected_oe property

protected array $attributesById
return array

$fieldFactory protected_oe property

protected FieldFactory,Smile\ElasticsuiteCore\Index\Mapping $fieldFactory
return Smile\ElasticsuiteCore\Index\Mapping\FieldFactory

$fields protected_oe property

protected array $fields
return array

$indexedBackendModels protected_oe property

protected array $indexedBackendModels
return array

$resourceModel protected_oe property

protected AbstractAttributeData,Smile\ElasticsuiteCatalog\Model\ResourceModel\Eav\Indexer\Fulltext\Datasource $resourceModel
return Smile\ElasticsuiteCatalog\Model\ResourceModel\Eav\Indexer\Fulltext\Datasource\AbstractAttributeData