VuFind API Documentation

TopFacets extends AbstractFacets
in package

SideFacets Recommendations Module

This class provides recommendations displaying facets beside search results

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

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

$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 = []

Methods

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'

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

Return values
void

Search results