protected function ReferenceNormalizerBase::convertFormatType in Bibliography & Citation 8
Same name and namespace in other branches
- 2.0.x modules/bibcite_entity/src/Normalizer/ReferenceNormalizerBase.php \Drupal\bibcite_entity\Normalizer\ReferenceNormalizerBase::convertFormatType()
Convert format type to publication type.
Parameters
string $type: Format publication type.
string $format: Serializer format.
Return value
null|string Bibcite entity publication type.
1 call to ReferenceNormalizerBase::convertFormatType()
- ReferenceNormalizerBase::denormalize in modules/
bibcite_entity/ src/ Normalizer/ ReferenceNormalizerBase.php - Denormalizes data back into an object of the given class.
File
- modules/
bibcite_entity/ src/ Normalizer/ ReferenceNormalizerBase.php, line 238
Class
- ReferenceNormalizerBase
- Base normalizer class for bibcite formats.
Namespace
Drupal\bibcite_entity\NormalizerCode
protected function convertFormatType($type, $format) {
if (isset($this->typesMapping[$format][$type])) {
return $this->typesMapping[$format][$type];
}
elseif (isset($this->typesMapping[$format][$this->defaultType])) {
return $this->typesMapping[$format][$this->defaultType];
}
return self::DEFAULT_REF_TYPE;
}