You are here

protected function EndnoteReferenceNormalizer::extractFields in Bibliography & Citation 8

Same name and namespace in other branches
  1. 2.0.x modules/bibcite_endnote/src/Normalizer/EndnoteReferenceNormalizer.php \Drupal\bibcite_endnote\Normalizer\EndnoteReferenceNormalizer::extractFields()

Extract fields values from reference entity.

Parameters

\Drupal\bibcite_entity\Entity\ReferenceInterface $reference: Reference entity object.

string $format: Serializer format.

Return value

array Array of entity values.

Overrides ReferenceNormalizerBase::extractFields

File

modules/bibcite_endnote/src/Normalizer/EndnoteReferenceNormalizer.php, line 16

Class

EndnoteReferenceNormalizer
Normalizes/denormalizes reference entity to Endnote format.

Namespace

Drupal\bibcite_endnote\Normalizer

Code

protected function extractFields(ReferenceInterface $reference, $format) {
  $attributes = parent::extractFields($reference, $format);
  $attributes['title'] = $this
    ->extractScalar($reference
    ->get('title'));
  return $attributes;
}