You are here

public function FieldAttributeConverter::getAttributeName in Apigee Edge 8

Returns the name of the mapped attribute to a field.

Parameters

string $field_name: Name of a field.

Return value

string Name of the mapped attribute.

Overrides FieldAttributeConverterInterface::getAttributeName

1 call to FieldAttributeConverter::getAttributeName()
FieldAttributeConverter::getFieldValueFromAttribute in src/FieldAttributeConverter.php
Gets field value from the related attribute.

File

src/FieldAttributeConverter.php, line 91

Class

FieldAttributeConverter
Default field-attribute converter service implementation.

Namespace

Drupal\apigee_edge

Code

public function getAttributeName(string $field_name) : string {
  $field_prefix = $this
    ->getFieldPrefix();
  if ($field_prefix && strpos($field_name, $field_prefix) === 0) {
    return substr($field_name, strlen($field_prefix));
  }
  return $field_name;
}