VuFind API Documentation

SearchMemory extends AbstractHelper
in package

View helper for remembering recent user searches/parameters.

Tags
category

VuFind

author

Demian Katz demian.katz@villanova.edu

author

Juha Luoma juha.luoma@helsinki.fi

license

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

link

Wiki

Table of Contents

$memory  : Memory
Search memory
__construct()  : mixed
Constructor
getCurrentSearch()  : Results|null
Get current search
getCurrentSearchId()  : int|null
Get current search id
getEditLink()  : string
Get the URL to edit the last search.
getLastHiddenFilters()  : array<string|int, mixed>
Retrieve the last hidden filters used.
getLastLimit()  : string
Retrieve the last limit option used.
getLastSearch()  : Results|null
Get last search
getLastSearchId()  : int|null
Get last search id
getLastSearchLink()  : string
If a previous search is recorded in the session, return a link to it; otherwise, return a blank string.
getLastSearchParams()  : Params
Retrieve the parameters of the last search by the search class
getLastSearchUrl()  : string|null
If a previous search is recorded in the session, return its URL
getLastSort()  : string
Retrieve the last sort option used.

Properties

Methods

__construct()

Constructor

public __construct(Memory $memory) : mixed
Parameters
$memory : Memory

Search memory

Return values
mixed

getCurrentSearchId()

Get current search id

public getCurrentSearchId() : int|null
Return values
int|null

Get the URL to edit the last search.

public getEditLink(string $searchClassId, string $action, mixed $value) : string
Parameters
$searchClassId : string

Search class

$action : string

Action to take

$value : mixed

Value for action

Return values
string

getLastHiddenFilters()

Retrieve the last hidden filters used.

public getLastHiddenFilters(string $context) : array<string|int, mixed>
Parameters
$context : string

Context of search (usually search class ID).

Return values
array<string|int, mixed>

getLastLimit()

Retrieve the last limit option used.

public getLastLimit(string $context) : string
Parameters
$context : string

Context of search (usually search class ID).

Return values
string

getLastSearchId()

Get last search id

public getLastSearchId() : int|null
Return values
int|null

If a previous search is recorded in the session, return a link to it; otherwise, return a blank string.

public getLastSearchLink(string $link[, string $prefix = '' ][, string $suffix = '' ]) : string
Parameters
$link : string

Text to use as body of link

$prefix : string = ''

Text to place in front of link

$suffix : string = ''

Text to place after link

Return values
string

getLastSearchParams()

Retrieve the parameters of the last search by the search class

public getLastSearchParams(string $searchClassId) : Params
Parameters
$searchClassId : string

Search class

Return values
Params

getLastSearchUrl()

If a previous search is recorded in the session, return its URL

public getLastSearchUrl() : string|null
Return values
string|null

getLastSort()

Retrieve the last sort option used.

public getLastSort(string $context) : string
Parameters
$context : string

Context of search (usually search class ID).

Return values
string

Search results