getReferenceAttribute method

Attribute? getReferenceAttribute(
  1. String attributeId
)

Returns the attribute from the localized referential.

Implementation

Attribute? getReferenceAttribute(final String attributeId) {
  if (attributeGroups != null) {
    for (final AttributeGroup attributeGroup in attributeGroups!) {
      if (attributeGroup.attributes != null) {
        for (final Attribute attribute in attributeGroup.attributes!) {
          if (attribute.id == attributeId) {
            return attribute;
          }
        }
      }
    }
  }
  return null;
}