AbstractSearchObjectDeferred
in package
implements
RecommendInterface
Abstract SearchObjectDeferred Recommendations Module (needs to be extended to use a particular search object).
This class sets up an AJAX call to trigger a call to some SearchObject implementation.
Tags
Interfaces, Classes, Traits and Enums
- RecommendInterface
- Search Recommendations Interface
Table of Contents
- $lookfor : string
- Current search query
- $paramCount : int
- Number of expected module parameters (from .ini config)
- $processedParams : string
- Configuration parameters processed for submission via AJAX
- $rawParams : string
- Raw configuration parameters
- getUrlParams() : string
- Get the URL parameters needed to make the AJAX recommendation request.
- 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.
- getAjaxModule() : string
- Store the configuration of the recommendation module.
- initLookFor() : void
- Initialize the lookFor query parameter. Called from init().
Properties
$lookfor
Current search query
protected
string
$lookfor
$paramCount
Number of expected module parameters (from .ini config)
protected
int
$paramCount
= 2
$processedParams
Configuration parameters processed for submission via AJAX
protected
string
$processedParams
$rawParams
Raw configuration parameters
protected
string
$rawParams
Methods
getUrlParams()
Get the URL parameters needed to make the AJAX recommendation request.
public
getUrlParams() : 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 —getAjaxModule()
Store the configuration of the recommendation module.
protected
abstract getAjaxModule() : string
Return values
string —Module name in call to AjaxHandler
initLookFor()
Initialize the lookFor query parameter. Called from init().
protected
initLookFor(Params $params, Parameters $request, array<string|int, mixed> &$settings) : void
Parameters
- $params : Params
-
Search parameter object
- $request : Parameters
-
Parameter object representing user request.
- $settings : array<string|int, mixed>
-
Parameter array (passed by reference)