VuFind API Documentation

StorageRetrievalRequests extends AbstractRequestBase
in package

Action helper to perform storage retrieval request related actions

Tags
category

VuFind

author

Demian Katz demian.katz@villanova.edu

author

Ere Maijala ere.maijala@helsinki.fi

license

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

link

Main Page

Table of Contents

$dateConverter  : Converter
Date converter
$hmac  : HMAC
HMAC generator
$session  : Container
Session data
$sessionManager  : SessionManager
Session manager
__construct()  : mixed
Constructor
addCancelDetails()  : array<string|int, mixed>
Update ILS details with cancellation-specific information, if appropriate.
cancelStorageRetrievalRequests()  : array<string|int, mixed>
Process cancel request.
getDefaultRequiredDate()  : int
Getting a default required date based on hold settings.
rememberValidId()  : void
Add an ID to the validation array.
resetValidation()  : void
Reset the array of valid IDs in the session (used for form submission validation)
validateIds()  : bool
Validate supplied IDs against remembered IDs. Returns true if all supplied IDs are remembered, otherwise returns false.
validatePickUpInput()  : bool
Check if the user-provided pickup location is valid.
validatePickUpLocation()  : bool
Check if the provided pickup location is valid.
validateRequest()  : bool|array<string|int, mixed>
Method for validating contents of a request; returns an array of collected details if request is valid, otherwise returns false.
validateRequestGroup()  : bool
Check if the provided request group is valid.
validateRequestGroupInput()  : bool
Check if the user-provided request group is valid.
getDateFromArray()  : int
Support method for getDefaultRequiredDate() -- generate a date based on a days/months/years offset array.
getSession()  : Container
Grab the Container object for storing helper-specific session data.
getValidIds()  : array<string|int, mixed>
Get remembered valid IDs

Properties

Methods

__construct()

Constructor

public __construct(HMAC $hmac, SessionManager $sessionManager, Converter $dateConverter) : mixed
Parameters
$hmac : HMAC

HMAC generator

$sessionManager : SessionManager

Session manager

$dateConverter : Converter

Date converter

Return values
mixed

addCancelDetails()

Update ILS details with cancellation-specific information, if appropriate.

public addCancelDetails(Connection $catalog, array<string|int, mixed> $ilsDetails, array<string|int, mixed> $cancelStatus, array<string|int, mixed> $patron) : array<string|int, mixed>
Parameters
$catalog : Connection

ILS connection object

$ilsDetails : array<string|int, mixed>

Details from ILS driver's getMyStorageRetrievalRequests() method

$cancelStatus : array<string|int, mixed>

Cancellation settings from ILS driver's checkFunction() method

$patron : array<string|int, mixed>

ILS patron

Return values
array<string|int, mixed>

$ilsDetails with cancellation info added

cancelStorageRetrievalRequests()

Process cancel request.

public cancelStorageRetrievalRequests(Connection $catalog, array<string|int, mixed> $patron) : array<string|int, mixed>
Parameters
$catalog : Connection

ILS connection object

$patron : array<string|int, mixed>

Current logged in patron

Return values
array<string|int, mixed>

The result of the cancellation, an associative array keyed by item ID (empty if no cancellations performed)

getDefaultRequiredDate()

Getting a default required date based on hold settings.

public getDefaultRequiredDate(array<string|int, mixed> $checkHolds[, Connection $catalog = null ][, array<string|int, mixed> $patron = null ][, array<string|int, mixed> $holdInfo = null ]) : int
Parameters
$checkHolds : array<string|int, mixed>

Hold settings returned by the ILS driver's checkFunction method.

$catalog : Connection = null

ILS connection (optional)

$patron : array<string|int, mixed> = null

Patron details (optional)

$holdInfo : array<string|int, mixed> = null

Hold details (optional)

Return values
int

A timestamp representing the default required date

rememberValidId()

Add an ID to the validation array.

public rememberValidId(string $id) : void
Parameters
$id : string

ID to remember

Return values
void

resetValidation()

Reset the array of valid IDs in the session (used for form submission validation)

public resetValidation() : void
Return values
void

validateIds()

Validate supplied IDs against remembered IDs. Returns true if all supplied IDs are remembered, otherwise returns false.

public validateIds(array<string|int, mixed> $ids) : bool
Parameters
$ids : array<string|int, mixed>

IDs to validate

Return values
bool

validatePickUpInput()

Check if the user-provided pickup location is valid.

public validatePickUpInput(string $pickup, array<string|int, mixed> $extraHoldFields, array<string|int, mixed> $pickUpLibs) : bool
Parameters
$pickup : string

User-specified pickup location

$extraHoldFields : array<string|int, mixed>

Hold form fields enabled by configuration/driver

$pickUpLibs : array<string|int, mixed>

Pickup library list from driver

Return values
bool

validatePickUpLocation()

Check if the provided pickup location is valid.

public validatePickUpLocation(string $location, array<string|int, mixed> $pickUpLibs) : bool
Parameters
$location : string

Location to check

$pickUpLibs : array<string|int, mixed>

Pickup locations list from driver

Return values
bool

validateRequest()

Method for validating contents of a request; returns an array of collected details if request is valid, otherwise returns false.

public validateRequest(array<string|int, mixed> $linkData) : bool|array<string|int, mixed>
Parameters
$linkData : array<string|int, mixed>

An array of keys to check

Return values
bool|array<string|int, mixed>

validateRequestGroup()

Check if the provided request group is valid.

public validateRequestGroup(string $requestGroupId, array<string|int, mixed> $requestGroups) : bool
Parameters
$requestGroupId : string

Id of the request group to check

$requestGroups : array<string|int, mixed>

Request group list from driver

Return values
bool

validateRequestGroupInput()

Check if the user-provided request group is valid.

public validateRequestGroupInput(array<string|int, mixed> $gatheredDetails, array<string|int, mixed> $extraHoldFields, array<string|int, mixed> $requestGroups) : bool
Parameters
$gatheredDetails : array<string|int, mixed>

User hold parameters

$extraHoldFields : array<string|int, mixed>

Form fields enabled by configuration/driver

$requestGroups : array<string|int, mixed>

Request group list from driver

Return values
bool

getDateFromArray()

Support method for getDefaultRequiredDate() -- generate a date based on a days/months/years offset array.

protected getDateFromArray(array<string|int, mixed> $dateArray) : int
Parameters
$dateArray : array<string|int, mixed>

3-element array containing day/month/year offsets

Return values
int

A timestamp representing the default required date

getSession()

Grab the Container object for storing helper-specific session data.

protected getSession() : Container
Return values
Container

getValidIds()

Get remembered valid IDs

protected getValidIds() : array<string|int, mixed>
Return values
array<string|int, mixed>

Search results