public function BiblioStyleBibtex::importGeneric in Bibliography Module 7.3
Import a generic property.
Parameters
EntityMetadataWrapper $wrapper: The wrapped Biblio object.
$key: The key to import.
$entry: The data to import from.
4 calls to BiblioStyleBibtex::importGeneric()
- BiblioStyleBibtex::importPublisher in plugins/
biblio_style/ bibtex/ BiblioStyleBibtex.class.php - Import publisher.
- BiblioStyleBibtex::importSecondaryTitle in plugins/
biblio_style/ bibtex/ BiblioStyleBibtex.class.php - Import secondary title.
- BiblioStyleBibtex::importTertiaryTitle in plugins/
biblio_style/ bibtex/ BiblioStyleBibtex.class.php - Import tertiary title.
- BiblioStyleBibtex::importYear in plugins/
biblio_style/ bibtex/ BiblioStyleBibtex.class.php - Import year.
File
- plugins/
biblio_style/ bibtex/ BiblioStyleBibtex.class.php, line 86 - BibTeX style.
Class
- BiblioStyleBibtex
- @file BibTeX style.
Code
public function importGeneric(EntityMetadataWrapper $wrapper, $key, $entry) {
if (empty($entry[$key])) {
return;
}
$map = $this
->getMapping();
$map = $map['field'];
$property = $map[$key]['property'];
// Some BibTex might come we double curly brackets, so strip them out from
// the beginning and end of the value.
$value = trim($entry[$key], '{}');
$wrapper->{$property}
->set($value);
}