Skip to content
Snippets Groups Projects
Commit 39b42f60 authored by Patrick Barroca's avatar Patrick Barroca :grin:
Browse files

rel #13283 : begin unimarc export implementation

parent 15de85b7
Branches
Tags
3 merge requests!258Dev/13872 Orphee Allow Hold Available Items,!108Dev#13283 Export Pret Unimarc,!99Dev#13283 Export Pret Unimarc
......@@ -142,6 +142,7 @@ class Class_Exemplaire extends Storm_Model_Abstract {
return $sigbExemplaire->isDisponible();
}
public function isReservable() {
if ($this->getNotice()->isRessourceNumerique())
return false;
......@@ -154,21 +155,28 @@ class Class_Exemplaire extends Storm_Model_Abstract {
public function getSubfield($id) {
$fields = $this->zone995toArray();
return isset($fields[$id]) ? $fields[$id] : '';
}
protected function zone995toArray() {
$fields = [];
array_map(
function($field) use (&$fields) {
$parts = explode('=', $field);
$fields[$parts[0]] = $parts[1];
},
explode(' ', $this->getZone995())
);
return isset($fields[$id]) ? $fields[$id] : '';
explode(' ', $this->getZone995()));
return $fields;
}
public function toUnimarcIso2709() {
return "995";
$writer = new Class_NoticeUnimarc_Writer();
$writer->setNotice($this->getNotice()->getUnimarc());
$writer->add_field('995', ' ', $this->zone995toArray());
return $writer->toUnimarcIso2709();
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment