Skip to content
Snippets Groups Projects
Commit 0ba6769c authored by Frank Morgner's avatar Frank Morgner
Browse files

refs #13831

* adds method getCartographicData at SolrMarcFincTrait for retrieval of marc21 subfields 255$a$c
parent f296a35a
No related merge requests found
......@@ -1915,6 +1915,34 @@ trait SolrMarcFincTrait
return $this->getFirstFieldValue('245', ['n']);
}
/**
* Get Cartographic Mathematical Data
*
* @return array Return multidimensional array with key of 'coordinates'
* and 'scale'
* @access public
*/
public function getCartographicData() {
// internal vars
$retVal = [];
$i = 0;
// map of subfield to returning value key
$mapper = ['a' => 'scale', 'c' => 'coordinates'];
$fields = $this->getMarcRecord()->getFields('255');
foreach($fields as $f) {
foreach ($mapper as $subfield => $key) {
$sub = $f->getSubField($subfield);
if ($sub) {
$retVal[$i][$key] = $sub->getData();
}
}
$i++;
}
return $retVal;
}
/**
* Get an array of content notes.
*
......
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