protected function MarcReferenceNormalizer::extractFields in Bibliography & Citation 2.0.x
Same name and namespace in other branches
- 8 modules/bibcite_marc/src/Normalizer/MarcReferenceNormalizer.php \Drupal\bibcite_marc\Normalizer\MarcReferenceNormalizer::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_marc/ src/ Normalizer/ MarcReferenceNormalizer.php, line 16
Class
- MarcReferenceNormalizer
- Normalizes/denormalizes reference entity to Marc format.
Namespace
Drupal\bibcite_marc\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;
}