LISTCOMMON
in package
LISTCOMMON common functions for listing, searching, selecting etc. resources
Table of Contents
Properties
- $allIds : mixed
- boolean
- $asearchForm : mixed
- string
- $attachmentIds : mixed
- array
- $basket : mixed
- bool
- $browse : mixed
- string
- $displayAttachmentZip : mixed
- bool
- $displayBibSelectBox : mixed
- bool
- $front : mixed
- bool
- $highlight : mixed
- object
- $listParams : mixed
- array
- $listQuarantined : mixed
- boolean
- $metadata : mixed
- boolean
- $metadataKeyword : mixed
- string
- $metadataKGKeywords : mixed
- array
- $metadataPaging : mixed
- boolean
- $metadataText : mixed
- array
- $metadataTextCite : mixed
- array
- $metadataTextCond : mixed
- array
- $metadataTextJoin : mixed
- array
- $metadataType : mixed
- string
- $navigate : mixed
- string
- $qsearchForm : mixed
- string
- $quarantineList : mixed
- bool
- $quickSearch : mixed
- bool
- $zoomAction : mixed
- string
Methods
- __construct() : mixed
- LISTCOMMON
- checkAttachOrder() : mixed
- Get the search order according to attachment options (or not)
- checkForMessages() : mixed
- Check for any messages (typically from NAVIGATE such as after adding items to the basket)
- display2() : bool
- Produce a list of resources
- displayAscDesc() : string
- Print radio buttons ascending, descending for ordering
- displayOrder() : string
- Ordering options for select and quicksearch
- idSource() : mixed
- Get the search ids from various search sources
- initiateSearch() : mixed
- Initiate the search
- noResources() : bool
- Tidy display when there are no resources
- populateRows() : array<string|int, mixed>
- Populate $this->rows with resource data ready for displaying.
- quarantine() : mixed
- Conditions for quarantined resources
- resourcesExist() : bool
- Check there are resources to display
- useAllIds() : mixed
- AllIds exist, so use them for the search/list
Properties
$allIds
boolean
public
mixed
$allIds
= \FALSE
$asearchForm
string
public
mixed
$asearchForm
= ''
$attachmentIds
array
public
mixed
$attachmentIds
= []
$basket
bool
public
mixed
$basket
= \FALSE
$browse
string
public
mixed
$browse
= \FALSE
$displayAttachmentZip
bool
public
mixed
$displayAttachmentZip
= \FALSE
$displayBibSelectBox
bool
public
mixed
$displayBibSelectBox
= \TRUE
$front
bool
public
mixed
$front
= \FALSE
$highlight
object
public
mixed
$highlight
$listParams
array
public
mixed
$listParams
= []
$listQuarantined
boolean
public
mixed
$listQuarantined
= \FALSE
$metadata
boolean
public
mixed
$metadata
= \FALSE
$metadataKeyword
string
public
mixed
$metadataKeyword
= \FALSE
$metadataKGKeywords
array
public
mixed
$metadataKGKeywords
= []
$metadataPaging
boolean
public
mixed
$metadataPaging
= \FALSE
$metadataText
array
public
mixed
$metadataText
= []
$metadataTextCite
array
public
mixed
$metadataTextCite
= []
$metadataTextCond
array
public
mixed
$metadataTextCond
= []
$metadataTextJoin
array
public
mixed
$metadataTextJoin
= []
$metadataType
string
public
mixed
$metadataType
= \FALSE
$navigate
string
public
mixed
$navigate
= 'list'
$qsearchForm
string
public
mixed
$qsearchForm
= ''
$quarantineList
bool
public
mixed
$quarantineList
= \FALSE
$quickSearch
bool
public
mixed
$quickSearch
= \FALSE
$zoomAction
string
public
mixed
$zoomAction
Methods
__construct()
LISTCOMMON
public
__construct() : mixed
populateRows() and display() are the two main functions called externally. populateRows(): 1. Set up the paging system and store the total number of resource ids found. 2. Populate $this->row with resource data from BIBCITEGATEWAY. Resource ids for this can be found here with SQL conditions and joins set prior to calling populateRows() or can be supplied externally (e.g., from the basket). display() — currently display2(): 1. Uses $this->row to provide to the web browser templates for display.
checkAttachOrder()
Get the search order according to attachment options (or not)
public
checkAttachOrder(bool $reorder) : mixed
Parameters
- $reorder : bool
-
return string
checkForMessages()
Check for any messages (typically from NAVIGATE such as after adding items to the basket)
public
checkForMessages() : mixed
display2()
Produce a list of resources
public
display2(string $listType) : bool
Parameters
- $listType : string
Return values
booldisplayAscDesc()
Print radio buttons ascending, descending for ordering
public
displayAscDesc(string $type) : string
Parameters
- $type : string
Return values
stringdisplayOrder()
Ordering options for select and quicksearch
public
displayOrder(string $type[, bool $reorder = false ]) : string
Parameters
- $type : string
- $reorder : bool = false
-
Default is FALSE
Return values
stringidSource()
Get the search ids from various search sources
public
idSource(string $listType, object $searchCommon) : mixed
Parameters
- $listType : string
- $searchCommon : object
initiateSearch()
Initiate the search
public
initiateSearch(string $listType, string $order, string $queryString, array<string|int, mixed> $ids) : mixed
Parameters
- $listType : string
- $order : string
- $queryString : string
- $ids : array<string|int, mixed>
noResources()
Tidy display when there are no resources
public
noResources(string $listType) : bool
Parameters
- $listType : string
Return values
boolpopulateRows()
Populate $this->rows with resource data ready for displaying.
public
populateRows(string $listType, string $order, string $ascDesc, string $queryString[, string $table = 'resource' ][, string $resId = 'resourceId' ][, array<string|int, mixed> $extIds = [] ][, bool $all = false ][, bool $reorder = false ]) : array<string|int, mixed>
Set the total resources found. Set bibCite flags.
Parameters
- $listType : string
- $order : string
- $ascDesc : string
- $queryString : string
- $table : string = 'resource'
-
(default 'resource')
- $resId : string = 'resourceId'
-
(default 'resourceId')
- $extIds : array<string|int, mixed> = []
-
(default []. Resource ids might come in externally from basket or the front page)
- $all : bool = false
-
Default is FALSE
- $reorder : bool = false
-
Default is FALSE
Return values
array<string|int, mixed>quarantine()
Conditions for quarantined resources
public
quarantine([bool $joinMisc = false ][, string $joinId = 'resourceId' ]) : mixed
Parameters
- $joinMisc : bool = false
-
Default is FALSE
- $joinId : string = 'resourceId'
-
Default is 'resourceId'
resourcesExist()
Check there are resources to display
public
resourcesExist([bool $front = false ]) : bool
Parameters
- $front : bool = false
-
Default = FALSE
Return values
booluseAllIds()
AllIds exist, so use them for the search/list
public
useAllIds(string $listType, string $order, string $queryString) : mixed
Parameters
- $listType : string
- $order : string
- $queryString : string