TopFacets
extends AbstractFacets
in package
SideFacets Recommendations Module
This class provides recommendations displaying facets beside search results
Tags
Table of Contents
- $baseSettings : array<string|int, mixed>
- Basic configurations
- $configLoader : PluginManager
- Configuration loader
- $excludableFacets : array<string|int, mixed>
- Facets with "exclude" links enabled
- $facets : array<string|int, mixed>
- Facet configuration
- $orFacets : array<string|int, mixed>
- Facets that are "ORed" instead of "ANDed."
- $results : Results
- Search results
- __construct() : mixed
- Constructor
- excludeAllowed() : bool
- Is the specified field allowed to be excluded?
- getFacetOperator() : string
- Get the facet boolean operator
- getResults() : Results
- Get results stored in the object.
- getTopFacetSet() : array<string|int, mixed>
- Get facet information taken from the search.
- getTopFacetSettings() : array<string|int, mixed>
- Get configuration settings related to top facets.
- 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.
- loadBooleanConfigs() : void
- Read boolean (OR/NOT) settings from the provided configuration
Properties
$baseSettings
Basic configurations
protected
array<string|int, mixed>
$baseSettings
$configLoader
Configuration loader
protected
PluginManager
$configLoader
$excludableFacets
Facets with "exclude" links enabled
protected
array<string|int, mixed>
$excludableFacets
= []
$facets
Facet configuration
protected
array<string|int, mixed>
$facets
$orFacets
Facets that are "ORed" instead of "ANDed."
protected
array<string|int, mixed>
$orFacets
= []
$results
Search results
protected
Results
$results
Methods
__construct()
Constructor
public
__construct(PluginManager $configLoader) : mixed
Parameters
- $configLoader : PluginManager
-
Configuration loader
Return values
mixed —excludeAllowed()
Is the specified field allowed to be excluded?
public
excludeAllowed(string $field) : bool
Parameters
- $field : string
-
Field name
Return values
bool —getFacetOperator()
Get the facet boolean operator
public
getFacetOperator(string $field) : string
Parameters
- $field : string
-
Field name
Return values
string —'AND' or 'OR'
getResults()
Get results stored in the object.
public
getResults() : Results
Return values
Results —getTopFacetSet()
Get facet information taken from the search.
public
getTopFacetSet() : array<string|int, mixed>
Return values
array<string|int, mixed> —getTopFacetSettings()
Get configuration settings related to top facets.
public
getTopFacetSettings() : array<string|int, mixed>
Return values
array<string|int, mixed> —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
TopFacets:[ini section]:[ini name] Display facets listed in the specified section of the specified ini file; if [ini name] is left out, it defaults to "facets."
Parameters
- $settings : string
-
Settings from searches.ini.
Return values
void —loadBooleanConfigs()
Read boolean (OR/NOT) settings from the provided configuration
protected
loadBooleanConfigs(Config $config, array<string|int, mixed> $allFacets[, string $section = 'Results_Settings' ]) : void
Parameters
- $config : Config
-
Configuration to read
- $allFacets : array<string|int, mixed>
-
All facets (to use when config = *)
- $section : string = 'Results_Settings'
-
Configuration section containing settings