VuFind API Documentation

VisualFacets extends AbstractFacets
in package

VisualFacets Recommendations Module

This class supports visualizing pivot facet information as a treemap or circle packing visualization.

It must be used in combination with a template file including the necessary Javascript in order to display the visualization to the user.

Tags
category

VuFind

author

Julia Bauder bauderj@grinnell.edu

license

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

link

Wiki

Table of Contents

$configLoader  : PluginManager
Configuration loader
$excludableFacets  : array<string|int, mixed>
Facets with "exclude" links enabled
$facets  : string
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
getPivotFacetSet()  : array<string|int, mixed>
Get facet information taken from the search.
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.
loadBooleanConfigs()  : void
Read boolean (OR/NOT) settings from the provided configuration

Properties

$excludableFacets

Facets with "exclude" links enabled

protected array<string|int, mixed> $excludableFacets = []

$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'

getPivotFacetSet()

Get facet information taken from the search.

public getPivotFacetSet() : 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

VisualFacets:[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