24 private $addressDataObjectMethods;
29 private $attributeMetadataConverter;
34 private $attributeMetadataDataProvider;
44 $this->attributeMetadataConverter = $attributeMetadataConverter;
45 $this->attributeMetadataDataProvider = $attributeMetadataDataProvider;
54 $attributesFormCollection = $this->attributeMetadataDataProvider->loadAttributesCollection(
58 foreach ($attributesFormCollection as
$attribute) {
74 $attribute = $this->attributeMetadataDataProvider
77 $attributeMetadata = $this->attributeMetadataConverter->createMetadataAttribute(
$attribute);
78 return $attributeMetadata;
82 'No such entity with %fieldName = %fieldValue, %field2Name = %field2Value',
84 'fieldName' =>
'entityType',
86 'field2Name' =>
'attributeCode',
100 $attributeCodes = $this->attributeMetadataDataProvider->getAllAttributeCodes(
105 $allAttributesMetadata = [];
110 }
catch (NoSuchEntityException $e) {
115 return $allAttributesMetadata;
123 if (!$this->addressDataObjectMethods) {
124 $dataObjectMethods = array_flip(get_class_methods($dataObjectClassName));
125 $baseClassDataObjectMethods = array_flip(
126 get_class_methods(\
Magento\Framework\Api\AbstractExtensibleObject::class)
128 $this->addressDataObjectMethods = array_diff_key($dataObjectMethods, $baseClassDataObjectMethods);
130 $customAttributes = [];
134 $isDataObjectMethod = isset($this->addressDataObjectMethods[
'get' . $camelCaseKey])
135 || isset($this->addressDataObjectMethods[
'is' . $camelCaseKey]);
137 if (!$isDataObjectMethod && !$attributeMetadata->isSystem()) {
138 $customAttributes[] = $attributeMetadata;
141 return $customAttributes;
static snakeCaseToUpperCamelCase($input)
static singleField($fieldName, $fieldValue)