VuFind API Documentation

HierarchicalFacetListener
in package

Solr hierarchical facet handling listener.

Tags
category

VuFind

author

David Maus maus@hab.de

author

Ere Maijala ere.maijala@helsinki.fi

license

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

link

Main Site

Table of Contents

$backend  : BackendInterface
Backend.
$displayStyles  : array<string|int, mixed>
Facet display styles.
$facetConfig  : Config
Facet configuration.
$facetHelper  : HierarchicalFacetHelper
Facet helper.
$separators  : array<string|int, mixed>
Hierarchy level separators
$serviceLocator  : ServiceLocatorInterface
Service container.
$translatedFacets  : array<string|int, mixed>
Facet settings
$translatedFacetsTextDomains  : array<string|int, mixed>
Text domains for translated facets
__construct()  : void
Constructor.
attach()  : void
Attach listener to shared event manager.
onSearchPost()  : EventInterface
Format hierarchical facets accordingly
formatFacetField()  : string
Format a facet field according to the settings
processHierarchicalFacets()  : void
Process hierarchical facets and format them accordingly

Properties

$translatedFacetsTextDomains

Text domains for translated facets

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

Methods

__construct()

Constructor.

public __construct(BackendInterface $backend, ServiceLocatorInterface $serviceLocator, string $facetConfig) : void
Parameters
$backend : BackendInterface

Search backend

$serviceLocator : ServiceLocatorInterface

Service locator

$facetConfig : string

Facet config file id

Return values
void

attach()

Attach listener to shared event manager.

public attach(SharedEventManagerInterface $manager) : void
Parameters
$manager : SharedEventManagerInterface

Shared event manager

Return values
void

onSearchPost()

Format hierarchical facets accordingly

public onSearchPost(EventInterface $event) : EventInterface
Parameters
$event : EventInterface

Event

Return values
EventInterface

formatFacetField()

Format a facet field according to the settings

protected formatFacetField(string $facet, string $value) : string
Parameters
$facet : string

Facet field

$value : string

Facet value

Return values
string

Formatted field

processHierarchicalFacets()

Process hierarchical facets and format them accordingly

protected processHierarchicalFacets(EventInterface $event) : void
Parameters
$event : EventInterface

Event

Return values
void

Search results