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.
development:plugins:record_drivers

This is an old revision of the document!


Record Driver Plugins

Record drivers are used to allow VuFind to interact with arbitrary metadata. Every record is represented by a driver object which wraps around the raw data (whether it comes from a Solr index, a third-party API response, or a database lookup). The record drivers implement consistent interfaces that allow other code to make use of data without concern for its origin.

Key Plugin Details

Default Namespace: \VuFind\RecordDriver

Base Class: \VuFind\RecordDriver\AbstractBase

Service Locator Configuration Section in module.config.php: ['vufind']['plugin_managers']['recorddriver']

Service Manager Name for Service Locator: VuFind\RecordDriverPluginManager

Template Name: VuFind loads record-related templates from the subdirectory of the RecordDriver folder of the current theme whose name corresponds with the class of the plugin (ignoring the namespace). Template directories inherit from one another in the same way that PHP classes inherit from one another – i.e. if VuFind\RecordDriver\SolrMarc is a subclass of VuFind\RecordDriver\SolrDefault, VuFind will first check RecordDriver\SolrMarc for templates, then fail over to RecordDriver\SolrDefault if they are missing.

Record driver templates have access to the object itself as $this→driver.

See the General Plugin Information page for more details on VuFind plugins.

Notes

  • Record drivers used with the Solr index should be registered in the service locator with names that correspond with the recordtype value in the Solr index prepended with “Solr.” For example, if recordtype = marc in the Solr index, a service called “SolrMarc” will be loaded from the service locator. If no matching service can be found, the SolrDefault service will be used.
  • See the Record Driver Method Master List for more notes on how record drivers work.
development/plugins/record_drivers.1449769439.txt.gz · Last modified: 2015/12/10 17:43 by demiankatz