protected function BibtexReferenceNormalizer::extractFields in Bibliography & Citation 2.0.x
Same name and namespace in other branches
- 8 modules/bibcite_bibtex/src/Normalizer/BibtexReferenceNormalizer.php \Drupal\bibcite_bibtex\Normalizer\BibtexReferenceNormalizer::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
1 call to BibtexReferenceNormalizer::extractFields()
- BibtexReferenceNormalizer::normalize in modules/
bibcite_bibtex/ src/ Normalizer/ BibtexReferenceNormalizer.php
File
- modules/
bibcite_bibtex/ src/ Normalizer/ BibtexReferenceNormalizer.php, line 77
Class
- BibtexReferenceNormalizer
- Normalizes/denormalizes reference entity to BibTeX format.
Namespace
Drupal\bibcite_bibtex\NormalizerCode
protected function extractFields(ReferenceInterface $reference, $format) {
$attributes = parent::extractFields($reference, $format);
$attributes['title'] = $this
->extractScalar($reference
->get('title'));
$attributes['reference'] = $reference
->id();
return $attributes;
}