public function AccessControlHierarchyInterface::getTree in Workbench Access 8
Gets the entire hierarchy tree.
This method will return a hierarcy tree from any supported source in a standard array structure. Using this method allows our code to abstract handling of access controls.
The array has the following components.
id - The lookup id of the entity or object (e.g. term tid). parents - A sorted array of ids for any parent items of this item. label - The human-readable label of the entity or object. description - A human-readable help description of this item. path - A fully-formed URL string for this item. depth - The depth in the hierarchy of this item. weight - The sort order (weight) of this item at its depth.
The first two items in this array (id, parents) are used to generate access control logic. The remaining items are used for building forms and user interfaces. Note that the last two items (depth, weight) are normally handled by the sorting done by the tree builder. They are provided in case your code needs to re-sort the tree.
Return value
array An array in the format defined above.
1 method overrides AccessControlHierarchyInterface::getTree()
- AccessControlHierarchyBase::getTree in src/
AccessControlHierarchyBase.php - Gets the entire hierarchy tree.
File
- src/
AccessControlHierarchyInterface.php, line 66
Class
- AccessControlHierarchyInterface
- Defines a base hierarchy class that others may extend.
Namespace
Drupal\workbench_accessCode
public function getTree();