VuFind API Documentation

CustomFilterListener
in package

Solr custom filter listener.

Tags
category

VuFind

author

Demian Katz demian.katz@villanova.edu

license

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

link

Main Site

Table of Contents

$backend  : BackendInterface
Backend.
$filterParam  : string
Name of parameter used to store filters
$invertedFilters  : array<string|int, mixed>
Inverted filters
$normalFilters  : array<string|int, mixed>
Normal filters
__construct()  : void
Constructor.
attach()  : void
Attach listener to shared event manager.
onSearchPre()  : EventInterface
Apply/translate custom filters.

Properties

$filterParam

Name of parameter used to store filters

protected string $filterParam = 'fq'

Methods

__construct()

Constructor.

public __construct(BackendInterface $backend, array<string|int, mixed> $normal, array<string|int, mixed> $inverted) : void
Parameters
$backend : BackendInterface

Backend

$normal : array<string|int, mixed>

Normal custom filters (placeholder => full filter)

$inverted : array<string|int, mixed>

Inverted custom filters (applied unless set)

Return values
void

attach()

Attach listener to shared event manager.

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

Shared event manager

Return values
void

onSearchPre()

Apply/translate custom filters.

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

Event

Return values
EventInterface

Search results