function DataFieldRow::getFieldKeyAlias

Same name in other branches
  1. 9 core/modules/rest/src/Plugin/views/row/DataFieldRow.php \Drupal\rest\Plugin\views\row\DataFieldRow::getFieldKeyAlias()
  2. 8.9.x core/modules/rest/src/Plugin/views/row/DataFieldRow.php \Drupal\rest\Plugin\views\row\DataFieldRow::getFieldKeyAlias()
  3. 10 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 172

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.