MarcReferenceNormalizer.php in Bibliography & Citation 2.0.x
File
modules/bibcite_marc/src/Normalizer/MarcReferenceNormalizer.php
View source
<?php
namespace Drupal\bibcite_marc\Normalizer;
use Drupal\bibcite_entity\Entity\ReferenceInterface;
use Drupal\bibcite_entity\Normalizer\ReferenceNormalizerBase;
class MarcReferenceNormalizer extends ReferenceNormalizerBase {
protected function extractFields(ReferenceInterface $reference, $format) {
$attributes = parent::extractFields($reference, $format);
$attributes['title'] = $this
->extractScalar($reference
->get('title'));
$attributes['reference'] = $reference
->id();
return $attributes;
}
}