VuFind API Documentation

AbstractBase
in package

Hierarchy Tree Renderer

This is a base helper class for producing hierarchy Trees.

Tags
category

VuFind

author

Luke O'Sullivan l.osullivan@swansea.ac.uk

license

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

link

Wiki

Table of Contents

$dataSource  : AbstractBase
Source of hierarchy data
$recordDriver  : AbstractBase
Hierarchical record to work on
getHierarchyName()  : string
Get Hierarchy Name
getTreeList()  : mixed
Get a list of trees containing the item represented by the stored record driver.
render()  : mixed
Render the Hierarchy Tree
setRecordDriver()  : AbstractBase
Set the record driver to operate on
getDataSource()  : AbstractBase
Get the current hierarchy data source
getRecordDriver()  : DefaultRecord
Get the current record driver

Properties

Methods

getHierarchyName()

Get Hierarchy Name

public getHierarchyName(string $hierarchyID, array<string|int, mixed> $inHierarchies, array<string|int, mixed> $inHierarchiesTitle) : string
Parameters
$hierarchyID : string

The hierarchy ID to find the title for

$inHierarchies : array<string|int, mixed>

An array of hierarchy IDs

$inHierarchiesTitle : array<string|int, mixed>

An array of hierarchy Titles

Return values
string

A hierarchy title

getTreeList()

Get a list of trees containing the item represented by the stored record driver.

public abstract getTreeList([string $hierarchyID = false ]) : mixed
Parameters
$hierarchyID : string = false

Optional filter: specific hierarchy ID to retrieve

Return values
mixed

An array of hierarchy IDS if a hierarchy tree exists, false if it does not

render()

Render the Hierarchy Tree

public abstract render(string $context, string $mode, string $hierarchyID[, string|null $selectedID = null ]) : mixed
Parameters
$context : string

The context from which the call has been made

$mode : string

The mode in which the tree should be generated

$hierarchyID : string

The hierarchy ID of the tree to fetch (optional)

$selectedID : string|null = null

The current record ID (optional)

Return values
mixed

The desired hierarchy tree output (or false on error)

Search results