CustomFilterListener
in package
Solr custom filter listener.
Tags
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
$backend
Backend.
protected
BackendInterface
$backend
$filterParam
Name of parameter used to store filters
protected
string
$filterParam
= 'fq'
$invertedFilters
Inverted filters
protected
array<string|int, mixed>
$invertedFilters
$normalFilters
Normal filters
protected
array<string|int, mixed>
$normalFilters
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