You are here

public function DataFieldRow::getFieldKeyAlias in Zircon Profile 8.0

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 166
Contains \Drupal\rest\Plugin\views\row\DataFieldRow.

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;
}