PHP Class Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Indexer\Fulltext\Datasource\AttributeData

Author: Aurelien FOUCRET ([email protected])
Inheritance: extends Smile\ElasticsuiteCatalog\Model\ResourceModel\Eav\Indexer\Fulltext\Datasource\AbstractAttributeData
Show file Open project: smile-sa/elasticsuite

Public Methods

Method Description
__construct ( Magento\Framework\App\ResourceConnection $resource, Magento\Store\Model\StoreManagerInterface $storeManager, Magento\Framework\EntityManager\MetadataPool $metadataPool, Magento\Catalog\Model\Product\Type $catalogProductType, string $entityType = ProductInterface::class ) Constructor.
loadChildrens ( array $productIds ) : array Retrieve list of children ids for a product list.

Protected Methods

Method Description
getEntityTypeId ( ) : string Get Entity Id used by this indexer
getProductEmulator ( string $typeId ) : Magento\Framework\DataObject Retrieve Product Emulator (Magento Object) by type identifier.
getProductTypeInstance ( string $typeId ) : Magento\Catalog\Model\Product\Type\AbstractType Retrieve product type instance from identifier.

Method Details

__construct() public method

Constructor.
public __construct ( Magento\Framework\App\ResourceConnection $resource, Magento\Store\Model\StoreManagerInterface $storeManager, Magento\Framework\EntityManager\MetadataPool $metadataPool, Magento\Catalog\Model\Product\Type $catalogProductType, string $entityType = ProductInterface::class )
$resource Magento\Framework\App\ResourceConnection Database adpater.
$storeManager Magento\Store\Model\StoreManagerInterface Store manager.
$metadataPool Magento\Framework\EntityManager\MetadataPool Metadata Pool.
$catalogProductType Magento\Catalog\Model\Product\Type Product type.
$entityType string Product entity type.

getEntityTypeId() protected method

Get Entity Id used by this indexer
protected getEntityTypeId ( ) : string
return string

getProductEmulator() protected method

Retrieve Product Emulator (Magento Object) by type identifier.
protected getProductEmulator ( string $typeId ) : Magento\Framework\DataObject
$typeId string Type identifier.
return Magento\Framework\DataObject

getProductTypeInstance() protected method

Retrieve product type instance from identifier.
protected getProductTypeInstance ( string $typeId ) : Magento\Catalog\Model\Product\Type\AbstractType
$typeId string Type identifier.
return Magento\Catalog\Model\Product\Type\AbstractType

loadChildrens() public method

Warning the result use children ids as a key and list of parents as value
public loadChildrens ( array $productIds ) : array
$productIds array List of parent product ids.
return array