Skip to content
Snippets Groups Projects
Commit 92c467c7 authored by Dorian Merz's avatar Dorian Merz
Browse files

Merge branch 'master-v5' into instance/fid

parents 2466739c 95b1d4dc
No related merge requests found
......@@ -28,9 +28,10 @@
*/
namespace finc\View\Helper\Root;
use VuFindSearch\Query\Query as Query;
use VuFind\Exception\RecordMissing as RecordMissingException;
use VuFind\Record\Loader as Loader;
use VuFind\Record\Router as Router;
use VuFindSearch\Query\Query as Query;
use VuFindSearch\Service as SearchService;
/**
......@@ -139,4 +140,23 @@ class RecordLink extends \VuFind\View\Helper\Root\RecordLink
}
return null;
}
/**
* Get the default URL for a record.
* refs #16002 - don't throw exception if record not found
*
* @param \VuFind\RecordDriver\AbstractBase|string $driver Record driver
* representing record to link to, or source|id pipe-delimited string
*
* @return string
*/
public function getUrl($driver)
{
try {
return $this->getTabUrl($driver);
}
catch (RecordMissingException $exception) {
return "";
}
}
}
......@@ -13,7 +13,7 @@ return [
'interlibraryloan' => 'finc\View\Helper\Root\InterlibraryLoanLink',
'sideFacet' => 'finc\View\Helper\Root\SideFacet',
'resultfeed' => 'finc\View\Helper\Root\ResultFeed',
'recordlink' => 'finc\View\Helper\Root\RecordLink',
'recordLink' => 'finc\View\Helper\Root\RecordLink',
],
'factories' => [
'finc\View\Helper\Root\BranchInfo' =>
......
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