You are here

public function DataFieldRow::getFieldKeyAlias in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/rest/src/Plugin/views/row/DataFieldRow.php \Drupal\rest\Plugin\views\row\DataFieldRow::getFieldKeyAlias()

Return an alias for a field ID, as set in the options form.

Parameters

string $id: The field id to lookup an alias for.

Return value

string The matches user entered alias, or the original ID if nothing is found.

File

core/modules/rest/src/Plugin/views/row/DataFieldRow.php, line 171

Class

DataFieldRow
Plugin which displays fields as raw data.

Namespace

Drupal\rest\Plugin\views\row

Code

public function getFieldKeyAlias($id) {
  if (isset($this->replacementAliases[$id])) {
    return $this->replacementAliases[$id];
  }
  return $id;
}