public function ReferenceNormalizerBase::setFormat in Bibliography & Citation 2.0.x
Same name and namespace in other branches
- 8 modules/bibcite_entity/src/Normalizer/ReferenceNormalizerBase.php \Drupal\bibcite_entity\Normalizer\ReferenceNormalizerBase::setFormat()
Format setter for DI calls.
Parameters
string|array $format: Normalizer format.
File
- modules/
bibcite_entity/ src/ Normalizer/ ReferenceNormalizerBase.php, line 44
Class
- ReferenceNormalizerBase
- Base normalizer class for bibcite formats.
Namespace
Drupal\bibcite_entity\NormalizerCode
public function setFormat($format) {
$this->format = $format;
foreach ((array) $this->format as $format) {
$config_name = sprintf('bibcite_entity.mapping.%s', $format);
$config = $this->configFactory
->get($config_name);
$this->fieldsMapping[$format] = $config
->get('fields');
$this->typesMapping[$format] = $config
->get('types');
}
}