About Features Downloads Getting Started Documentation Events Support GitHub

Love VuFind®? Consider becoming a financial supporter. Your support helps build a better VuFind®!

Site Tools


Warning: This page has not been updated in over over a year and may be outdated or deprecated.
configuration:course_reserves

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
configuration:course_reserves [2023/05/31 18:18] – Add instructions for multiple reserve cores dltjconfiguration:course_reserves [2023/05/31 21:02] – [Multiple reserve Solr cores] Revise instructions. dltj
Line 46: Line 46:
 If your Solr installation has more than one core for reserves (for instance, your Solr service is used by more than one VuFind installation), you can change the name of the reserves core. If your Solr installation has more than one core for reserves (for instance, your Solr service is used by more than one VuFind installation), you can change the name of the reserves core.
  
-1.) Copy module/VuFind/src/VuFind/Search/Factory/SolrReservesBackendFactory.php into your VuFind module directory.+1.) Create module/<your_module>/src/VuFind/Search/Factory/SolrReservesBackendFactory.php and extend the parent class. Change $this->solrCore to the name of your reserves Solr core:
  
-2.Change $this->solrCore in the constructor to the name of the reserves core.+<code> 
 +<?php 
 +namespace <your_module>\Search\Factory; 
 + 
 +class SolrReservesBackendFactory extends \VuFind\Search\Factory\SolrReservesBackendFactory 
 +
 +    public function __construct() 
 +    { 
 +        parent::__construct(); 
 +        $this->solrCore = '<your-library>_reserves'; 
 +    } 
 +
 +</code>
  
-3.) Add a factory plugin to the new factory in your module's "module.config.php"+2.) Add a factory plugin to the new factory in your module's "module.config.php"
  
 <code> <code>
-      'search_backend' =>+'vufind' => 
 +  array( 
 +    'search_backend' =>
       array(       array(
         'factories' =>         'factories' =>
-        array( +          array( 
-          'SolrReserves' => '<your_module>\Search\Factory\SolrReservesBackendFactory', +            'SolrReserves' => '<your_module>\Search\Factory\SolrReservesBackendFactory', 
-        )+          )
       )       )
 +  )
 </code> </code>
 ---- struct data ---- ---- struct data ----
configuration/course_reserves.txt · Last modified: 2023/11/09 18:47 by demiankatz