VuFind API Documentation

GetSideFacets extends AbstractBase
in package
implements LoggerAwareInterface Uses LoggerAwareTrait

"Get Side Facets" AJAX handler

Tags
category

VuFind

author

Ere Maijala ere.maijala@helsinki.fi

author

Juha Luoma juha.luoma@helsinki.fi

license

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

link

Wiki

Interfaces, Classes, Traits and Enums

LoggerAwareInterface

Table of Contents

$recommendPluginManager  : PluginManager
Recommend plugin manager
$renderer  : RendererInterface
View renderer
$searchRunner  : SearchRunner
Search runner
$sessionSettings  : Settings
Session settings
__construct()  : mixed
Constructor
handleRequest()  : array<string|int, mixed>
Handle a request.
debug()  : void
Log a debug message.
disableSessionWrites()  : void
Prevent session writes -- this is designed to be called prior to time- consuming AJAX operations to help reduce the odds of a timing-related bug that causes the wrong version of session data to be written to disk (see VUFIND-716 for more details).
formatFacets()  : array<string|int, mixed>
Format facets according to their type
formatResponse()  : array<string|int, mixed>
Format a response array.
getCheckboxFacetCount()  : int|null
Get the result count for a checkbox facet
getFacetResults()  : Results
Perform search and return the results
log()  : void
Send a message to the logger.
logError()  : void
Log an error message.
logWarning()  : void
Log a warning message.

Properties

$renderer

View renderer

protected RendererInterface $renderer

Methods

handleRequest()

Handle a request.

public handleRequest(Params $params) : array<string|int, mixed>
Parameters
$params : Params

Parameter helper from controller

Return values
array<string|int, mixed>

[response data, HTTP status code]

debug()

Log a debug message.

protected debug(string $msg[, array<string|int, mixed> $context = [] ][, bool $prependClass = true ]) : void
Parameters
$msg : string

Log message

$context : array<string|int, mixed> = []

Log context

$prependClass : bool = true

Prepend class name to message?

Return values
void

disableSessionWrites()

Prevent session writes -- this is designed to be called prior to time- consuming AJAX operations to help reduce the odds of a timing-related bug that causes the wrong version of session data to be written to disk (see VUFIND-716 for more details).

protected disableSessionWrites() : void
Return values
void

formatFacets()

Format facets according to their type

protected formatFacets(array<string|int, mixed> $context, SideFacets $recommend, array<string|int, mixed> $facets, Results $results) : array<string|int, mixed>
Parameters
$context : array<string|int, mixed>

View rendering context

$recommend : SideFacets

Recommendation module

$facets : array<string|int, mixed>

Facets to process

$results : Results

Search results

Return values
array<string|int, mixed>

formatResponse()

Format a response array.

protected formatResponse(mixed $response[, int $httpCode = null ]) : array<string|int, mixed>
Parameters
$response : mixed

Response data

$httpCode : int = null

HTTP status code (omit for default)

Return values
array<string|int, mixed>

getCheckboxFacetCount()

Get the result count for a checkbox facet

protected getCheckboxFacetCount(string $facet, Results $results) : int|null
Parameters
$facet : string

Facet

$results : Results

Search results

Return values
int|null

getFacetResults()

Perform search and return the results

protected getFacetResults(array<string|int, mixed> $request, string $index, string $loc) : Results
Parameters
$request : array<string|int, mixed>

Request params

$index : string

Index of SideFacetsDeferred in configuration

$loc : string

Location where SideFacetsDeferred is configured

Return values
Results

log()

Send a message to the logger.

protected log(string $level, string $message[, array<string|int, mixed> $context = [] ][, bool $prependClass = false ]) : void
Parameters
$level : string

Log level

$message : string

Log message

$context : array<string|int, mixed> = []

Log context

$prependClass : bool = false

Prepend class name to message?

Return values
void

logError()

Log an error message.

protected logError(string $msg[, array<string|int, mixed> $context = [] ][, bool $prependClass = true ]) : void
Parameters
$msg : string

Log message

$context : array<string|int, mixed> = []

Log context

$prependClass : bool = true

Prepend class name to message?

Return values
void

logWarning()

Log a warning message.

protected logWarning(string $msg[, array<string|int, mixed> $context = [] ][, bool $prependClass = true ]) : void
Parameters
$msg : string

Log message

$context : array<string|int, mixed> = []

Log context

$prependClass : bool = true

Prepend class name to message?

Return values
void

Search results