CollectionSideFacets
extends SideFacets
in package
CollectionSideFacets Recommendations Module
This class extends the SideFacets functionality for use in Collection display.
Tags
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
- $keywordFilter : bool
- Is the keyword filter box active?
- $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?
- 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
- getKeywordFilter() : string
- Get the current value of the keyword filter.
- 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).
- keywordFilterEnabled() : bool
- Is the keyword filter box enabled?
- 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
$configLoader
Configuration loader
protected
PluginManager
$configLoader
$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
= []
$hierarchicalFacetHelper
Hierarchical facet helper
protected
HierarchicalFacetHelper
$hierarchicalFacetHelper
$hierarchicalFacets
Hierarchical facet setting
protected
array<string|int, mixed>
$hierarchicalFacets
= []
$hierarchicalFacetSortOptions
Hierarchical facet sort options
protected
array<string|int, mixed>
$hierarchicalFacetSortOptions
= []
$keywordFilter
Is the keyword filter box active?
protected
bool
$keywordFilter
= false
$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
= []
$results
Search results
protected
Results
$results
$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
__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 —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
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> —getKeywordFilter()
Get the current value of the keyword filter.
public
getKeywordFilter() : string
Return values
string —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.
getResults()
Get results stored in the object.
public
getResults() : Results
Return values
Results —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.
Parameters
- $params : Params
-
Search parameter object
- $request : Parameters
-
Parameter object representing user request.
Return values
void —keywordFilterEnabled()
Is the keyword filter box enabled?
public
keywordFilterEnabled() : bool
Return values
bool —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