Skip to content
Snippets Groups Projects
Commit 66242405 authored by Robert Lange's avatar Robert Lange
Browse files

Merge branch 'finc' into instance/fid

parents 8f2286c2 c1fe4d29
No related merge requests found
......@@ -125,6 +125,14 @@ trait SolrMarcFincTrait
'609' => ['a']
];
// access status mappings for subfield $7
$accessStatusMapping = [
'0' => 'Open',
'1' => 'Restricted',
'u' => 'unspecified',
'z' => 'Other'
];
foreach ($fieldsToCheck as $field => $subfields) {
$urls = $this->getMarcRecord()->getFields($field);
$resultsPerIndicator2 = [];
......@@ -172,10 +180,17 @@ trait SolrMarcFincTrait
}
}
$sub7 = $url->getSubfield("7");
if ($sub7) {
$accessStatus = $sub7->getData();
}
$resultsPerIndicator2[$indicator2][$isil][] = [
'url' => $address,
'desc' => $desc,
'indicators' => $indicator1 . $indicator2,
'accessStatus' => isset($accessStatus)
? $accessStatusMapping[$accessStatus] : '',
];
}
if ($field == '609') {
......
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