You are here

protected function ReferenceNormalizerBase::extractAuthors in Bibliography & Citation 2.0.x

Same name and namespace in other branches
  1. 8 modules/bibcite_entity/src/Normalizer/ReferenceNormalizerBase.php \Drupal\bibcite_entity\Normalizer\ReferenceNormalizerBase::extractAuthors()

Extract authors values from field.

Parameters

\Drupal\Core\Field\FieldItemListInterface $field_item_list: List of field items.

Return value

array Authors in BibTeX format.

1 call to ReferenceNormalizerBase::extractAuthors()
ReferenceNormalizerBase::normalize in modules/bibcite_entity/src/Normalizer/ReferenceNormalizerBase.php
1 method overrides ReferenceNormalizerBase::extractAuthors()
CslReferenceNormalizer::extractAuthors in modules/bibcite_entity/src/Normalizer/CslReferenceNormalizer.php
Extract authors values from field.

File

modules/bibcite_entity/src/Normalizer/ReferenceNormalizerBase.php, line 299

Class

ReferenceNormalizerBase
Base normalizer class for bibcite formats.

Namespace

Drupal\bibcite_entity\Normalizer

Code

protected function extractAuthors(FieldItemListInterface $field_item_list) {
  $authors = [];
  foreach ($field_item_list as $field) {
    $authors[] = $field->entity
      ->getName();
  }
  return $authors;
}