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. |
Результат | 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];
}