HierarchyAwareTrait
Hierarchy support for record drivers.
Assumption: Hierarchy fields found in $this->fields. Assumption: Config object found in $this->mainConfig.
Tags
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
$hierarchyDriver
Hierarchy driver for current object
protected
AbstractBase
$hierarchyDriver
= null
$hierarchyDriverManager
Hierarchy driver plugin manager
protected
PluginManager
$hierarchyDriverManager
= null
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> —getHierarchyDriver()
Get a hierarchy driver appropriate to the current object. (May be false if disabled/unavailable).
public
getHierarchyDriver() : AbstractBase|bool
Return values
AbstractBase|bool —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 —setHierarchyDriverManager()
Inject a hierarchy driver plugin manager.
public
setHierarchyDriverManager(PluginManager $pm) : object
Parameters
- $pm : PluginManager
-
Hierarchy driver manager