diff --git a/module/fid/src/AjaxHandler/GetResolverLinks.php b/module/fid/src/AjaxHandler/GetResolverLinks.php index ba15d1a8b852306abe4ab6b088255ebb8a21661d..810640b01e98ee5f6b690ff4a154e1a82fa1aba0 100644 --- a/module/fid/src/AjaxHandler/GetResolverLinks.php +++ b/module/fid/src/AjaxHandler/GetResolverLinks.php @@ -68,8 +68,8 @@ class GetResolverLinks extends \VuFind\AjaxHandler\GetResolverLinks * @param SessionSettings $ss Session settings * @param ResolverManager $pm Resolver driver plugin manager * @param RendererInterface $renderer View renderer - * @param Config $config Top-level VuFind configuration (config.ini) - * @param Config $resolver Top-level VuFind configuration (Resolver.ini) + * @param Config $config Top-level VuFind config (config.ini) + * @param Config $resolver Top-level VuFind config (Resolver.ini) */ public function __construct( SessionSettings $ss, @@ -107,7 +107,8 @@ class GetResolverLinks extends \VuFind\AjaxHandler\GetResolverLinks if (in_array($requestedResolver, $resolvers) && isset($this->resolverConfig->$requestedResolver) ) { - $resolverType = $this->resolverConfig->$requestedResolver->resolver ?? 'generic'; + $resolverType = $this->resolverConfig + ->$requestedResolver->resolver ?? 'generic'; if (!$this->pluginManager->has($resolverType)) { return $this->formatResponse( $this->translate("Could not load driver for $resolverType"), @@ -163,8 +164,8 @@ class GetResolverLinks extends \VuFind\AjaxHandler\GetResolverLinks if (isset($this->resolverConfig->$requestedResolver) && isset($this->resolverConfig->$requestedResolver->url) ) { - // Trim off any parameters (for legacy compatibility -- default config - // used to include extraneous parameters): + // Trim off any parameters for legacy compatibility + // default config used to include extraneous parameters): [$base] = explode( '?', $this->resolverConfig->$requestedResolver->url @@ -178,9 +179,13 @@ class GetResolverLinks extends \VuFind\AjaxHandler\GetResolverLinks // Render the links using the view: $view = [ - 'openUrlBase' => $base, 'openUrl' => $openUrl, - 'electronic' => $electronic, 'unknown' => $unknown, 'services' => $services, - 'searchClassId' => $searchClassId, 'resolver' => $requestedResolver, + 'openUrlBase' => $base, + 'openUrl' => $openUrl, + 'electronic' => $electronic, + 'unknown' => $unknown, + 'services' => $services, + 'searchClassId' => $searchClassId, + 'resolver' => $requestedResolver, 'moreOptionsLink' => $moreOptionsLink ]; $viewPrint = [ @@ -193,9 +198,18 @@ class GetResolverLinks extends \VuFind\AjaxHandler\GetResolverLinks ]; } - $html = $this->renderer->render("ajax/resolverLinks.phtml", $view); - $print = $this->renderer->render("ajax/resolverLinks-print.phtml", $viewPrint); - $button = $this->renderer->render("ajax/resolverLinks-button.phtml", $viewButton); + $html = $this->renderer->render( + "ajax/resolverLinks.phtml", + $view + ); + $print = $this->renderer->render( + "ajax/resolverLinks-print.phtml", + $viewPrint + ); + $button = $this->renderer->render( + "ajax/resolverLinks-button.phtml", + $viewButton + ); // output HTML encoded in JSON object return $this->formatResponse(compact('html', 'print', 'button')); diff --git a/module/fid/src/AjaxHandler/GetResolverLinksFactory.php b/module/fid/src/AjaxHandler/GetResolverLinksFactory.php index 870129b2f152be75a1b85ccf4b378a75fb8ddb60..c7bd3c3561d692089b24b8d5e5cada8fdb031040 100644 --- a/module/fid/src/AjaxHandler/GetResolverLinksFactory.php +++ b/module/fid/src/AjaxHandler/GetResolverLinksFactory.php @@ -30,6 +30,7 @@ namespace fid\AjaxHandler; use Interop\Container\ContainerInterface; +use Zend\ServiceManager\Factory\FactoryInterface; /** * Factory for GetResolverLinks AJAX handler. @@ -41,7 +42,7 @@ use Interop\Container\ContainerInterface; * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link https://vufind.org/wiki/development Wiki */ -class GetResolverLinksFactory implements \Zend\ServiceManager\Factory\FactoryInterface +class GetResolverLinksFactory implements FactoryInterface { /** * Create an object