You are here

public function CallbackFieldRow::getFieldKeyAlias in Search Autocomplete 8

Same name and namespace in other branches
  1. 2.x src/Plugin/views/row/CallbackFieldRow.php \Drupal\search_autocomplete\Plugin\views\row\CallbackFieldRow::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

src/Plugin/views/row/CallbackFieldRow.php, line 202

Class

CallbackFieldRow
Plugin which displays fields as raw data.

Namespace

Drupal\search_autocomplete\Plugin\views\row

Code

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