26 private $attributeMetadataCache;
45 ->get(AttributeMetadataCache::class);
53 $attributes = $this->attributeMetadataCache->load($this->entityType, $formCode);
57 $attributes = $this->metadata->getAttributes($formCode);
58 $this->attributeMetadataCache->save($this->entityType,
$attributes, $formCode);
67 $attributesMetadata = $this->attributeMetadataCache->load($this->entityType,
$attributeCode);
68 if (
false !== $attributesMetadata) {
69 return array_shift($attributesMetadata);
71 $attributeMetadata = $this->metadata->getAttributeMetadata(
$attributeCode);
72 $this->attributeMetadataCache->save($this->entityType, [$attributeMetadata],
$attributeCode);
73 return $attributeMetadata;
81 $attributes = $this->attributeMetadataCache->load($this->entityType,
'all');
85 $attributes = $this->metadata->getAllAttributesMetadata();
86 $this->attributeMetadataCache->save($this->entityType,
$attributes,
'all');
95 $attributes = $this->attributeMetadataCache->load($this->entityType,
'custom');
99 $attributes = $this->metadata->getCustomAttributesMetadata();
100 $this->attributeMetadataCache->save($this->entityType,
$attributes,
'custom');