Smile\ElasticsuiteCatalog\Helper\Attribute::getAttributeByStore PHP Method

getAttributeByStore() private method

This code uses a local cache to ensure correct performance during indexing.
private getAttributeByStore ( Magento\Eav\Model\Entity\Attribute\AttributeInterface | integer $attribute, integer $storeId ) : Magento\Catalog\Api\Data\EavAttributeInterface
$attribute Magento\Eav\Model\Entity\Attribute\AttributeInterface | integer Product attribute.
$storeId integer Store id.
return Magento\Catalog\Api\Data\EavAttributeInterface
    private function getAttributeByStore($attribute, $storeId)
    {
        $attributeId = $this->getAttributeId($attribute);
        if (!isset($this->storeAttributes[$storeId]) || !isset($this->storeAttributes[$storeId][$attributeId])) {
            /**
             * @var EavAttributeInterface
             */
            $storeAttribute = $this->attributeFactory->create();
            $storeAttribute->setStoreId($storeId)->load($attributeId);
            $this->storeAttributes[$storeId][$attributeId] = $storeAttribute;
        }
        return $this->storeAttributes[$storeId][$attributeId];
    }