VuFind API Documentation

HierarchyAwareTrait

Hierarchy support for record drivers.

Assumption: Hierarchy fields found in $this->fields. Assumption: Config object found in $this->mainConfig.

Tags
category

VuFind

author

Demian Katz demian.katz@villanova.edu

license

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

link

Wiki

Table of Contents

$hierarchyDriver  : AbstractBase
Hierarchy driver for current object
$hierarchyDriverManager  : PluginManager
Hierarchy driver plugin manager
getCollectionSearchId()  : string
Return the collection search ID for this record.
getContainingCollections()  : array<string|int, mixed>
Get an associative array (id => title) of collections containing this record.
getHierarchyDriver()  : AbstractBase|bool
Get a hierarchy driver appropriate to the current object. (May be false if disabled/unavailable).
getHierarchyTopID()  : array<string|int, mixed>
Get the hierarchy_top_id(s) associated with this item (empty if none).
getHierarchyTopTitle()  : array<string|int, mixed>
Get the absolute parent title(s) associated with this item (empty if none).
getHierarchyTrees()  : mixed
Get a list of hierarchy trees containing this record.
getHierarchyType()  : string|bool
Get the Hierarchy Type (false if none)
isCollection()  : bool
Get the value of whether or not this is a collection level record
setHierarchyDriverManager()  : object
Inject a hierarchy driver plugin manager.

Properties

Methods

getCollectionSearchId()

Return the collection search ID for this record.

public getCollectionSearchId() : string
Return values
string

getContainingCollections()

Get an associative array (id => title) of collections containing this record.

public getContainingCollections() : array<string|int, mixed>
Return values
array<string|int, mixed>

getHierarchyTopID()

Get the hierarchy_top_id(s) associated with this item (empty if none).

public getHierarchyTopID() : array<string|int, mixed>
Return values
array<string|int, mixed>

getHierarchyTopTitle()

Get the absolute parent title(s) associated with this item (empty if none).

public getHierarchyTopTitle() : array<string|int, mixed>
Return values
array<string|int, mixed>

getHierarchyTrees()

Get a list of hierarchy trees containing this record.

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

The hierarchy to get the tree for

Return values
mixed

An associative array of hierarchy trees on success (id => title), false if no hierarchies found

getHierarchyType()

Get the Hierarchy Type (false if none)

public getHierarchyType() : string|bool
Return values
string|bool

isCollection()

Get the value of whether or not this is a collection level record

public isCollection() : bool

NOTE: \VuFind\Hierarchy\TreeDataFormatter\AbstractBase::isCollection() duplicates some of this logic.

Return values
bool

Search results