Skip to content
Snippets Groups Projects
Commit 57179333 authored by André Lahmann's avatar André Lahmann
Browse files

refs #8675:

* added missing customized hasOpenUrlReplaceSetting method in finc Record view helper to reflect multi resolver config
parent 73c37e73
No related merge requests found
......@@ -69,7 +69,8 @@ class Factory
$sm->getServiceLocator()->get('VuFind\Config')->get('config'),
$sm->get('url'),
$sm->getServiceLocator()->get('VuFind\AuthManager'),
$sm->getServiceLocator()->get('finc\Rewrite')
$sm->getServiceLocator()->get('finc\Rewrite'),
$sm->getServiceLocator()->get('VuFind\Config')->get('Resolver')
);
}
......
......@@ -67,6 +67,13 @@ class Record extends \VuFind\View\Helper\Root\Record
*/
protected $rewrite;
/**
* Resolver configuration
*
* @var \Zend\Config\Config
*/
protected $resolverConfig;
/**
* Constructor
*
......@@ -76,12 +83,14 @@ class Record extends \VuFind\View\Helper\Root\Record
public function __construct($config = null,
\Zend\View\Helper\Url $helper,
\VuFind\Auth\Manager $manager,
$rewrite)
$rewrite,
$resolverConfig)
{
parent::__construct($config);
$this->url = $helper;
$this->manager = $manager;
$this->rewrite = $rewrite;
$this->resolverConfig = $resolverConfig;
}
/**
......@@ -281,6 +290,18 @@ class Record extends \VuFind\View\Helper\Root\Record
return $url;
}
/**
* Customized method for multi resolver support
*
* Get all the links associated with this record depending on the OpenURL setting
* replace_other_urls. Returns an array of associative arrays each containing
* 'desc' and 'url' keys.
*
* @return bool
*/
protected function hasOpenUrlReplaceSetting()
{
return isset($this->resolverConfig->General->replace_other_urls)
&& $this->resolverConfig->General->replace_other_urls;
}
}
\ No newline at end of file
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