public function BiblioStyleBase::saveOrFindDuplicateFromImportData in Bibliography Module 7.3
Given a of successful import, find duplicates or save the new Biblios.
Parameters
$result: Array keyed with 'success' and 'error'.
Return value
array Array keyed with 'new', 'duplicate', and 'error.
See also
BiblioStyleBase::saveOrFindDuplicateFromImportData()
1 call to BiblioStyleBase::saveOrFindDuplicateFromImportData()
- BiblioStyleBase::import in plugins/
biblio_style/ abstract.inc - Entry point for data import.
File
- plugins/
biblio_style/ abstract.inc, line 273
Class
- BiblioStyleBase
- An abstract implementation of MessageNotifierInterface.
Code
public function saveOrFindDuplicateFromImportData($result) {
$result += array(
'success' => array(),
);
foreach ($result['success'] as $biblio) {
if ($duplicate_biblio = $this
->isDuplicate($biblio)) {
$result['duplicate'][] = $duplicate_biblio;
}
else {
$biblio
->save();
$result['new'][] = $biblio;
}
}
unset($result['success']);
return $result;
}