ConfigurationBased
extends AbstractBase
in package
Configuration-Based Hierarchy Driver
Tags
Table of Contents
- $config : Config
- Driver configuration
- $dataManager : PluginManager
- Tree data source plugin manager
- $defaultTreeRenderer : string
- Default tree renderer
- $enabled : bool
- Are trees globally enabled?
- $rendererManager : PluginManager
- Tree renderer plugin manager
- __construct() : mixed
- Constructor
- getCollectionField() : string
- Get the Solr field name used for grouping together collection contents
- getCollectionLinkType() : string
- Get Collection Link Type from the config file
- getTreeCacheTime() : int
- Get Tree Cache Time
- getTreeRenderer() : object
- Returns the actual object for generating trees
- getTreeRendererType() : string
- Get Tree Renderer Type
- getTreeSettings() : array<string|int, mixed>
- Get Tree Settings
- getTreeSource() : object
- Returns the Source of the Tree
- getTreeSourceType() : string
- Get Tree Data Source Type
- render() : string
- Render the tree for a given record.
- showTree() : bool
- Show Tree
- treeSorting() : bool
- Check if sorting is enabled in the hierarchy Options
Properties
$config
Driver configuration
protected
Config
$config
$dataManager
Tree data source plugin manager
protected
PluginManager
$dataManager
$defaultTreeRenderer
Default tree renderer
protected
string
$defaultTreeRenderer
= 'HTMLTree'
$enabled
Are trees globally enabled?
protected
bool
$enabled
= true
$rendererManager
Tree renderer plugin manager
protected
PluginManager
$rendererManager
Methods
__construct()
Constructor
public
__construct(Config $config, PluginManager $dataManager, PluginManager $rendererManager[, array<string|int, mixed> $options = [] ]) : mixed
Parameters
- $config : Config
-
Configuration
- $dataManager : PluginManager
-
Tree data source plugin manager
- $rendererManager : PluginManager
-
Tree renderer plugin manager
- $options : array<string|int, mixed> = []
-
Extra options (if any)
Return values
mixed —getCollectionField()
Get the Solr field name used for grouping together collection contents
public
getCollectionField(bool $hasSearch) : string
Parameters
- $hasSearch : bool
-
Is the user performing a search?
Return values
string —getCollectionLinkType()
Get Collection Link Type from the config file
public
getCollectionLinkType() : string
Return values
string —getTreeCacheTime()
Get Tree Cache Time
public
getTreeCacheTime() : int
Returns the configuration setting for hierarchy tree caching time when using solr to build the tree
Return values
int —The value of the configuration setting
getTreeRenderer()
Returns the actual object for generating trees
public
getTreeRenderer(AbstractBase $driver) : object
Parameters
- $driver : AbstractBase
-
Record driver
Return values
object —getTreeRendererType()
Get Tree Renderer Type
public
getTreeRendererType() : string
Returns the configuration setting for generating a hierarchy tree
Return values
string —The value of the configuration setting
getTreeSettings()
Get Tree Settings
public
getTreeSettings() : array<string|int, mixed>
Returns all the configuration settings for a hierarchy tree
Return values
array<string|int, mixed> —The values of the configuration setting
getTreeSource()
Returns the Source of the Tree
public
getTreeSource() : object
Return values
object —The tree data source object
getTreeSourceType()
Get Tree Data Source Type
public
getTreeSourceType() : string
Return values
string —render()
Render the tree for a given record.
public
render(AbstractBase $driver, string $context, string $mode, string $hierarchyID, array<string|int, mixed> $options) : string
Parameters
- $driver : AbstractBase
-
Record driver
- $context : string
-
Context in which the tree is being created
- $mode : string
-
Type of tree required
- $hierarchyID : string
-
Hierarchy ID to get the tree for
- $options : array<string|int, mixed>
-
Additional options for the renderer
Return values
string —showTree()
Show Tree
public
showTree() : bool
Returns the configuration setting for displaying a hierarchy tree
Return values
bool —The boolean value of the configuration setting
treeSorting()
Check if sorting is enabled in the hierarchy Options
public
treeSorting() : bool
Returns the configuration setting for hierarchy tree sorting
Return values
bool —The value of the configuration setting