Retrieve a new product attribute collection.
public getAttributeCollection ( ) : Magento\Catalog\Model\ResourceModel\Product\Attribute\Collection | ||
Результат | Magento\Catalog\Model\ResourceModel\Product\Attribute\Collection |
/** * Init attributes used into ES. * * @return \Smile\ElasticsuiteCatalog\Model\Eav\Indexer\Fulltext\Datasource\AbstractAttributeData */ private function initAttributes() { $attributeCollection = $this->attributeHelper->getAttributeCollection(); $this->resourceModel->addIndexedFilterToAttributeCollection($attributeCollection); foreach ($attributeCollection as $attribute) { if ($this->canIndexAttribute($attribute)) { $attributeId = (int) $attribute->getId(); $this->attributesById[$attributeId] = $attribute; $this->attributeIdsByTable[$attribute->getBackendTable()][] = $attributeId; $this->initField($attribute); } } return $this; }