VuFind API Documentation

SideFacetsDeferred extends SideFacets
in package

SideFacetsDeferred Recommendations Module

This class provides recommendations displaying facets beside search results after the search results have been displayed

Tags
category

VuFind

author

Ere Maijala ere.maijala@helsinki.fi

license

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

link

Wiki

Table of Contents

$checkboxFacets  : array<string|int, mixed>
Checkbox facet configuration
$collapsedFacets  : bool|string
Collapsed facet setting
$configLoader  : PluginManager
Configuration loader
$dateFacets  : array<string|int, mixed>
Year-only date facet configuration
$excludableFacets  : array<string|int, mixed>
Facets with "exclude" links enabled
$fullDateFacets  : array<string|int, mixed>
Day/month/year date facet configuration
$genericRangeFacets  : array<string|int, mixed>
Generic range facet configuration
$hierarchicalFacetHelper  : HierarchicalFacetHelper
Hierarchical facet helper
$hierarchicalFacets  : array<string|int, mixed>
Hierarchical facet setting
$hierarchicalFacetSortOptions  : array<string|int, mixed>
Hierarchical facet sort options
$mainFacets  : array<string|int, mixed>
Main facet configuration
$numericRangeFacets  : array<string|int, mixed>
Numeric range facet configuration
$orFacets  : array<string|int, mixed>
Facets that are "ORed" instead of "ANDed."
$results  : Results
Search results
$showDynamicCheckboxFacets  : bool
Should we display dynamically-generated checkbox facets that are not explicitly configured in $checkboxFacets?
$showInLightboxSettings  : bool|string
Settings controlling how lightbox is used for facet display.
$showMoreSettings  : array<string|int, mixed>
Settings controlling how many values to display before "show more."
__construct()  : mixed
Constructor
excludeAllowed()  : bool
Is the specified field allowed to be excluded?
getActiveFacets()  : array<string|int, mixed>
Get active facets (key => display string)
getAllRangeFacets()  : array<string|int, mixed>
Get combined range details.
getCheckboxFacetSet()  : array<string|int, mixed>
Get checkbox facet information from the search results.
getCollapsedFacets()  : array<string|int, mixed>
Return the list of facets configured to be collapsed
getDateFacets()  : array<string|int, mixed>
Return year-based date facet information in a format processed for use in the view.
getFacetOperator()  : string
Get the facet boolean operator
getFacetSet()  : array<string|int, mixed>
Get facet information from the search results.
getFullDateFacets()  : array<string|int, mixed>
Return year/month/day-based date facet information in a format processed for use in the view.
getGenericRangeFacets()  : array<string|int, mixed>
Return generic range facet information in a format processed for use in the view.
getHierarchicalFacets()  : array<string|int, mixed>
Return the list of facets configured to be hierarchical
getHierarchicalFacetSortOptions()  : array<string|int, mixed>
Return the list of configured hierarchical facet sort options
getNumericRangeFacets()  : array<string|int, mixed>
Return numeric range facet information in a format processed for use in the view.
getResults()  : Results
Get results stored in the object.
getShowInLightboxSetting()  : int
Return settings for showing more results in the lightbox
getShowMoreSetting()  : int
Return the list of facets configured to be collapsed defaults to 6
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.
getRangeFacets()  : array<string|int, mixed>
Return range facet information in a format processed for use in the view.
loadBooleanConfigs()  : void
Read boolean (OR/NOT) settings from the provided configuration

Properties

$checkboxFacets

Checkbox facet configuration

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

$collapsedFacets

Collapsed facet setting

protected bool|string $collapsedFacets = false

$dateFacets

Year-only date facet configuration

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

$excludableFacets

Facets with "exclude" links enabled

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

$fullDateFacets

Day/month/year date facet configuration

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

$genericRangeFacets

Generic range facet configuration

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

$hierarchicalFacets

Hierarchical facet setting

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

$hierarchicalFacetSortOptions

Hierarchical facet sort options

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

$mainFacets

Main facet configuration

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

$numericRangeFacets

Numeric range facet configuration

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

$orFacets

Facets that are "ORed" instead of "ANDed."

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

$showDynamicCheckboxFacets

Should we display dynamically-generated checkbox facets that are not explicitly configured in $checkboxFacets?

protected bool $showDynamicCheckboxFacets = true

$showInLightboxSettings

Settings controlling how lightbox is used for facet display.

protected bool|string $showInLightboxSettings = []

$showMoreSettings

Settings controlling how many values to display before "show more."

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

Methods

excludeAllowed()

Is the specified field allowed to be excluded?

public excludeAllowed(string $field) : bool
Parameters
$field : string

Field name

Return values
bool

getActiveFacets()

Get active facets (key => display string)

public getActiveFacets() : array<string|int, mixed>
Return values
array<string|int, mixed>

getAllRangeFacets()

Get combined range details.

public getAllRangeFacets() : array<string|int, mixed>
Return values
array<string|int, mixed>

getCheckboxFacetSet()

Get checkbox facet information from the search results.

public getCheckboxFacetSet() : array<string|int, mixed>
Return values
array<string|int, mixed>

getCollapsedFacets()

Return the list of facets configured to be collapsed

public getCollapsedFacets() : array<string|int, mixed>
Return values
array<string|int, mixed>

getDateFacets()

Return year-based date facet information in a format processed for use in the view.

public getDateFacets() : array<string|int, mixed>
Return values
array<string|int, mixed>

Array of from/to value arrays keyed by field.

getFacetOperator()

Get the facet boolean operator

public getFacetOperator(string $field) : string
Parameters
$field : string

Field name

Return values
string

'AND' or 'OR'

getFacetSet()

Get facet information from the search results.

public getFacetSet() : array<string|int, mixed>
Tags
throws
Exception
Return values
array<string|int, mixed>

getFullDateFacets()

Return year/month/day-based date facet information in a format processed for use in the view.

public getFullDateFacets() : array<string|int, mixed>
Return values
array<string|int, mixed>

Array of from/to value arrays keyed by field.

getGenericRangeFacets()

Return generic range facet information in a format processed for use in the view.

public getGenericRangeFacets() : array<string|int, mixed>
Return values
array<string|int, mixed>

Array of from/to value arrays keyed by field.

getHierarchicalFacets()

Return the list of facets configured to be hierarchical

public getHierarchicalFacets() : array<string|int, mixed>
Return values
array<string|int, mixed>

getHierarchicalFacetSortOptions()

Return the list of configured hierarchical facet sort options

public getHierarchicalFacetSortOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>

getNumericRangeFacets()

Return numeric range facet information in a format processed for use in the view.

public getNumericRangeFacets() : array<string|int, mixed>
Return values
array<string|int, mixed>

Array of from/to value arrays keyed by field.

getShowInLightboxSetting()

Return settings for showing more results in the lightbox

public getShowInLightboxSetting(string $facetName) : int
Parameters
$facetName : string

Name of the facet to get

Return values
int

getShowMoreSetting()

Return the list of facets configured to be collapsed defaults to 6

public getShowMoreSetting(string $facetName[, int $default = 6 ]) : int
Parameters
$facetName : string

Name of the facet to get

$default : int = 6

Value to use if configuration is absent/invalid

Return values
int

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.

We'll not do anything here since we want to defer the whole process until the search is done.

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

getRangeFacets()

Return range facet information in a format processed for use in the view.

protected getRangeFacets(string $property) : array<string|int, mixed>
Parameters
$property : string

Name of property containing active range facets

Return values
array<string|int, mixed>

Array of from/to value arrays keyed by field.

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