You are here

private function BiblioStyleBibtex::formatKeywords in Bibliography Module 7.3

Taxonomy term format entry.

Parameters

EntityMetadataWrapper $wrapper: The wrapper object.

$key: The property name which holds the value of the field.

Return value

String The value of the property.

File

plugins/biblio_style/bibtex/BiblioStyleBibtex.class.php, line 416
BibTeX style.

Class

BiblioStyleBibtex
@file BibTeX style.

Code

private function formatKeywords($wrapper, $key) {
  if (!($terms = $wrapper->{$key}
    ->value())) {
    return;
  }
  $terms = is_array($terms) ? $terms : array(
    $terms,
  );
  $values = array();
  foreach ($terms as $term) {
    $values[] = $term->name;
  }
  return implode(', ', $values);
}