This is an old revision of the document!
Table of Contents
Record Tab Plugins
Record tab plugins are used to control which tabs appear on the record view. They can also be used to store convenience methods for use by the template used to render tab contents.
Key Plugin Details
Default Namespace: \VuFind\RecordTab
Interface: \VuFind\RecordTab\TabInterface
Base Class: \VuFind\RecordTab\AbstractBase
Service Locator Configuration Section in module.config.php: ['vufind']['plugin_managers']['recordtab']
Service Manager Name for Service Locator: VuFind\RecordTabPluginManager (VuFind 2.x-4.x), VuFind\RecordTab\PluginManager (VuFind 5.0+)
Template Name: VuFind loads tab templates from the subdirectory of the RecordTab folder of the current theme whose name corresponds with the lowercased class of the plugin (ignoring the namespace). For example, the template for \VuFind\RecordTab\TOC can be found in RecordTab/toc.phtml within your theme.
Template Context: Templates are rendered with $this→tab set to the controlling tab object and $this→driver set to the associated record driver. Both of these objects may be used to pull data needed for rendering.
See the General Plugin Information page for more details on VuFind plugins.
Notes
- Record tabs are loaded based on a mapping found in the ['vufind']['recorddriver_tabs'] section of module.config.php. Each sub-array is a map from a tab name (as used in a record URL) to a tab service (found in recordtab_plugin_manager). If a particular record driver is not defined in recorddriver_tabs, it will inherit configuration from a configured parent class (if applicable).