You are here

protected function Record::getFieldKeyAlias in Views OAI-PMH 8

Get alias for a key in fields list

Parameters

$id:

Return value

array|null

1 call to Record::getFieldKeyAlias()
Record::populateRow in src/Plugin/views/style/Record.php
Return a formatted row value in array with all values as cartesian product of rows

File

src/Plugin/views/style/Record.php, line 467

Class

Record
Plugin annotation @ViewsStyle( id = "views_oai_pmh_record", title = @Translation("OAI-PMH"), help = @Translation("Displays rows in OAI-PMH records."), display_types = {"oai_pmh"} )

Namespace

Drupal\views_oai_pmh\Plugin\views\style

Code

protected function getFieldKeyAlias($id) {
  $fields = $this->options['field_mappings'][$this->displayHandler
    ->getCurrentMetadataPrefix()];
  if (isset($fields) && isset($fields[$id]) && $fields[$id] !== 'none') {
    return $fields[$id];
  }
  return NULL;
}