Skip to content
Snippets Groups Projects
Commit d2e40bb0 authored by Ere Maijala's avatar Ere Maijala Committed by Robert Lange
Browse files

Alma: Make it easier to customize item location in getHolding. (#1514)

parent df041b18
Branches
Tags
No related merge requests found
......@@ -340,8 +340,7 @@ class Alma extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterface
'source' => 'Solr',
'availability' => $this->getAvailabilityFromItem($item),
'status' => $status,
'location'
=> $this->getTranslatableString($item->item_data->location),
'location' => $this->getItemLocation($item),
'reserve' => 'N', // TODO: support reserve status
'callnumber' => $this->getTranslatableString(
$item->holding_data->call_number
......@@ -1855,6 +1854,18 @@ class Alma extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterface
return false === $subfield ? '' : $subfield->getData();
}
/**
* Get location for an item
*
* @param SimpleXMLElement $item Item
*
* @return \VuFind\I18n\TranslatableString|string
*/
protected function getItemLocation($item)
{
return $this->getTranslatableString($item->item_data->location);
}
// @codingStandardsIgnoreStart
/**
......
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