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:channel_providers

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
development:plugins:channel_providers [2017/04/21 17:54] – [Key Plugin Details] demiankatzdevelopment:plugins:channel_providers [2018/03/14 18:00] – [Key Plugin Details] demiankatz
Line 13: Line 13:
 **Service Locator Configuration Section in module.config.php:** ['vufind']['plugin_managers']['channelprovider'] **Service Locator Configuration Section in module.config.php:** ['vufind']['plugin_managers']['channelprovider']
  
-**Service Manager Name for Service Locator:** VuFind\ChannelProviderPluginManager+**Service Manager Name for Service Locator:** VuFind\ChannelProviderPluginManager (VuFind 2.x-4.x), VuFind\ChannelProvider\PluginManager (VuFind 5.0+)
  
 See the [[development:plugins:general_information|General Plugin Information]] page for more details on VuFind plugins. See the [[development:plugins:general_information|General Plugin Information]] page for more details on VuFind plugins.
 +
 +===== Basic Structure =====
 +
 +Each channel provider must implement the ChannelProviderInterface. An AbstractChannelProvider is available which provides useful default functionality to cover most of the non-channel-specific details.
 +
 +==== Setup Methods ====
 +
 +The interface requires a setOptions method to accept configuration values from channels.ini, and a setProviderId method to accept a unique identifier for the current channel provider.
 +
 +==== Hooks ====
 +
 +The interface defines a configureSearchParams method which is used as a hook to configure a VuFind search parameters object prior to executing a search when channels are being generated from a user search. This hook is not used when channels are generated from a record. The AbstractChannelProvider provides an empty implemention, so this method can be ignored when it is not needed if subclassing the AbstractChannelProvider.
 +
 +==== Channel Providing Methods ====
 +
 +getFromRecord provides channel information related to a record driver. getFromSearch provides channel information related to a VuFind search results object.
 +
 +Each of these methods returns an array of arrays representing channels. Some channels may be fully populated with record information. Other channels may include token values which allow more details to be retrieved later. The token mechanism is necessary to allow a large number of channels to be generated without taking up too much time retrieving full details all at once.
 +
 +Both of these methods have an optional second parameter called $channelToken. This can accept one of the token values described above; if the token is omitted, information about all possible channels is returned. The value of the token is arbitrary -- the channel provider both produces and consumes token values, and it can use anything it needs to in order to allow fetching of specific channel information.
 ---- struct data ---- ---- struct data ----
 ---- ----
  
development/plugins/channel_providers.txt · Last modified: 2020/09/22 14:13 by demiankatz