Пример #1
0
 /**
  * {@inheritdoc}
  */
 public function getAttributes($formCode)
 {
     $attributes = [];
     $attributesFormCollection = $this->attributeMetadataDataProvider->loadAttributesCollection(self::ENTITY_TYPE_ADDRESS, $formCode);
     foreach ($attributesFormCollection as $attribute) {
         $attributes[$attribute->getAttributeCode()] = $this->attributeMetadataConverter->createMetadataAttribute($attribute);
     }
     return $attributes;
 }
Пример #2
0
 /**
  * {@inheritdoc}
  */
 public function getAttributes($formCode)
 {
     $attributes = [];
     $attributesFormCollection = $this->attributeMetadataDataProvider->loadAttributesCollection(self::ENTITY_TYPE_CUSTOMER, $formCode);
     foreach ($attributesFormCollection as $attribute) {
         /** @var $attribute \Magento\Customer\Model\Attribute */
         $attributes[$attribute->getAttributeCode()] = $this->attributeMetadataConverter->createMetadataAttribute($attribute);
     }
     return $attributes;
 }