VuFind API Documentation

SwitchType
in package
implements RecommendInterface

SwitchType Recommendations Module

This class recommends switching to a different search type.

Tags
category

VuFind

author

Demian Katz demian.katz@villanova.edu

author

Chris Hallberg challber@villanova.edu

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Wiki

Interfaces, Classes, Traits and Enums

RecommendInterface
Search Recommendations Interface

Table of Contents

$active  : bool
Is this module active?
$newHandler  : string
Search handler to try
$newHandlerName  : string
On-screen description of handler
$results  : Results
Results object
getNewHandler()  : string|false
Get the new search handler, or false if it does not apply.
getNewHandlerName()  : string
Get the description of the new search handler.
getResults()  : Results
Get results stored in the object.
init()  : void
Called before the Search Results object performs its main search (specifically, in response to \VuFind\Search\SearchRunner::EVENT_CONFIGURED).
process()  : void
Called after the Search Results object has performed its main search. This may be used to extract necessary information from the Search Results object or to perform completely unrelated processing.
setConfig()  : void
Store the configuration of the recommendation module.

Properties

$active

Is this module active?

protected bool $active

$newHandler

Search handler to try

protected string $newHandler

$newHandlerName

On-screen description of handler

protected string $newHandlerName

Methods

getNewHandler()

Get the new search handler, or false if it does not apply.

public getNewHandler() : string|false
Return values
string|false

getNewHandlerName()

Get the description of the new search handler.

public getNewHandlerName() : string
Return values
string

init()

Called before the Search Results object performs its main search (specifically, in response to \VuFind\Search\SearchRunner::EVENT_CONFIGURED).

public init(Params $params, Parameters $request) : void

This method is responsible for setting search parameters needed by the recommendation module and for reading any existing search parameters that may be needed.

Parameters
$params : Params

Search parameter object

$request : Parameters

Parameter object representing user request.

Return values
void

process()

Called after the Search Results object has performed its main search. This may be used to extract necessary information from the Search Results object or to perform completely unrelated processing.

public process(Results $results) : void
Parameters
$results : Results

Search results object

Return values
void

setConfig()

Store the configuration of the recommendation module.

public setConfig(string $settings) : void
Parameters
$settings : string

Settings from searches.ini.

Return values
void

Search results