|
ILIAS
release_8 Revision v8.24
|
Base class for nested set path based trees. More...
Inheritance diagram for ilNestedSetTree:
Collaboration diagram for ilNestedSetTree:Public Member Functions | |||
| __construct (ilTree $a_tree) | |||
| Constructor. More... | |||
| getTree () | |||
| getSubTreeIds (int $a_node_id) | |||
| Get subtree ids @retutn int[]. More... | |||
| getTrashSubTreeQuery (array $a_node, array $a_types, bool $a_force_join_reference=true, array $a_fields=[]) | |||
| Get subtree query for trashed tree items. More... | |||
| getSubTreeQuery (array $a_node, array $a_types=[], bool $a_force_join_reference=true, array $a_fields=[]) | |||
| Get subtree. More... | |||
| getRelation (array $a_node_a, array $a_node_b) | |||
| Get relation of two nodes. More... | |||
| getPathIds (int $a_endnode, int $a_startnode=0) | |||
| Get path ids from a startnode to a given endnode. More... | |||
| insertNode (int $a_node_id, int $a_parent_id, int $a_pos) | |||
| |||
| deleteTree (int $a_node_id) | |||
| Delete tree. More... | |||
| moveToTrash (int $a_node_id) | |||
| Move subtree to trash. More... | |||
| getPathIdsUsingNestedSets (int $a_endnode_id, int $a_startnode_id=0) | |||
| get path from a given startnode to a given endnode if startnode is not given the rootnode is startnode More... | |||
| moveTree (int $a_source_id, int $a_target_id, int $a_position) | |||
Move a source subtree to target.
| |||
| getSubtreeInfo (int $a_endnode_id) | |||
| validateParentRelations () | |||
Validate the parent relations of the tree implementation For nested set, validate the lft, rgt against child <-> parent For materialized path validate path against child <-> parent.
| |||
| getSubTreeIds (int $a_node_id) | |||
| Get subtree ids for a specific node. More... | |||
| getSubTreeQuery (array $a_node, array $a_types=[], bool $a_force_join_reference=true, array $a_fields=[]) | |||
| Get subtree query. More... | |||
| getTrashSubTreeQuery (array $a_node, array $a_types, bool $a_force_join_reference=true, array $a_fields=[]) | |||
| Get subtree query for trashed tree items. More... | |||
| getRelation (array $a_node_a, array $a_node_b) | |||
| Get relation of two nodes. More... | |||
| getPathIds (int $a_endnode, int $a_startnode=0) | |||
| Get path ids from a startnode to a given endnode. More... | |||
| insertNode (int $a_node_id, int $a_parent_id, int $a_pos) | |||
| deleteTree (int $a_node_id) | |||
| Delete tree. More... | |||
| moveToTrash (int $a_node_id) | |||
| Move subtree to trash. More... | |||
| moveTree (int $a_source_id, int $a_target_id, int $a_position) | |||
| Move a source subtree to target. More... | |||
| getSubtreeInfo (int $a_endnode_id) | |||
| Get subtree info lft, rgt, path, child, type. More... | |||
| validateParentRelations () | |||
| Validate the parent relations of the tree implementation For nested set, validate the lft, rgt against child <-> parent For materialized path validate path against child <-> parent. More... | |||
Protected Member Functions | |
| getPathIdsUsingAdjacencyMap (int $a_endnode_id, int $a_startnode_id=0) | |
| get path from a given startnode to a given endnode if startnode is not given the rootnode is startnode More... | |
Protected Attributes | |
| ilTree | $tree |
| ilDBInterface | $db |
Base class for nested set path based trees.
Definition at line 12 of file class.ilNestedSetTree.php.
| ilNestedSetTree::__construct | ( | ilTree | $a_tree | ) |
Constructor.
Definition at line 20 of file class.ilNestedSetTree.php.
References $DIC.
| ilNestedSetTree::deleteTree | ( | int | $a_node_id | ) |
Delete tree.
Implements ilTreeImplementation.
Definition at line 466 of file class.ilNestedSetTree.php.
References $query, $res, and ilDBConstants\FETCHMODE_ASSOC.
| ilNestedSetTree::getPathIds | ( | int | $a_endnode, |
| int | $a_startnode = 0 |
||
| ) |
Get path ids from a startnode to a given endnode.
| int | $a_endnode | |
| int | $a_startnode |
Implements ilTreeImplementation.
Definition at line 177 of file class.ilNestedSetTree.php.
|
protected |
get path from a given startnode to a given endnode if startnode is not given the rootnode is startnode
Definition at line 587 of file class.ilNestedSetTree.php.
References $data, $i, $query, $res, and ILIAS\Repository\int().
Here is the call graph for this function:| ilNestedSetTree::getPathIdsUsingNestedSets | ( | int | $a_endnode_id, |
| int | $a_startnode_id = 0 |
||
| ) |
get path from a given startnode to a given endnode if startnode is not given the rootnode is startnode
Definition at line 721 of file class.ilNestedSetTree.php.
References $data, $query, $res, and ILIAS\Repository\int().
Here is the call graph for this function:| ilNestedSetTree::getRelation | ( | array | $a_node_a, |
| array | $a_node_b | ||
| ) |
Get relation of two nodes.
Implements ilTreeImplementation.
Definition at line 155 of file class.ilNestedSetTree.php.
References ilTree\RELATION_CHILD, ilTree\RELATION_EQUALS, ilTree\RELATION_NONE, ilTree\RELATION_PARENT, and ilTree\RELATION_SIBLING.
| ilNestedSetTree::getSubTreeIds | ( | int | $a_node_id | ) |
Get subtree ids @retutn int[].
Implements ilTreeImplementation.
Definition at line 37 of file class.ilNestedSetTree.php.
References $query, $res, ilDBConstants\FETCHMODE_OBJECT, getTree(), and ILIAS\Repository\int().
Here is the call graph for this function:| ilNestedSetTree::getSubtreeInfo | ( | int | $a_endnode_id | ) |
| int | $a_endnode_id |
Implements ilTreeImplementation.
Definition at line 928 of file class.ilNestedSetTree.php.
References $query, $res, ilDBConstants\FETCHMODE_OBJECT, and ILIAS\Repository\int().
Here is the call graph for this function:| ilNestedSetTree::getSubTreeQuery | ( | array | $a_node, |
| array | $a_types = [], |
||
| bool | $a_force_join_reference = true, |
||
| array | $a_fields = [] |
||
| ) |
Get subtree.
Implements ilTreeImplementation.
Definition at line 107 of file class.ilNestedSetTree.php.
| ilNestedSetTree::getTrashSubTreeQuery | ( | array | $a_node, |
| array | $a_types, | ||
| bool | $a_force_join_reference = true, |
||
| array | $a_fields = [] |
||
| ) |
Get subtree query for trashed tree items.
Implements ilTreeImplementation.
Definition at line 62 of file class.ilNestedSetTree.php.
References getTree().
Here is the call graph for this function:| ilNestedSetTree::getTree | ( | ) |
Definition at line 28 of file class.ilNestedSetTree.php.
References $tree.
Referenced by getSubTreeIds(), and getTrashSubTreeQuery().
Here is the caller graph for this function:| ilNestedSetTree::insertNode | ( | int | $a_node_id, |
| int | $a_parent_id, | ||
| int | $a_pos | ||
| ) |
| ilInvalidTreeStructureException |
Implements ilTreeImplementation.
Definition at line 185 of file class.ilNestedSetTree.php.
References $query, $res, ilLogLevel\ERROR, ilLoggerFactory\getLogger(), ILIAS\Repository\int(), ilTree\POS_FIRST_NODE, and ilTree\POS_LAST_NODE.
Here is the call graph for this function:| ilNestedSetTree::moveToTrash | ( | int | $a_node_id | ) |
Move subtree to trash.
Implements ilTreeImplementation.
Definition at line 550 of file class.ilNestedSetTree.php.
References $query.
| ilNestedSetTree::moveTree | ( | int | $a_source_id, |
| int | $a_target_id, | ||
| int | $a_position | ||
| ) |
Move a source subtree to target.
| InvalidArgumentException |
Implements ilTreeImplementation.
Definition at line 765 of file class.ilNestedSetTree.php.
References $ilDB, $query, $res, ilLogLevel\ERROR, and ilLoggerFactory\getLogger().
Here is the call graph for this function:| ilNestedSetTree::validateParentRelations | ( | ) |
Validate the parent relations of the tree implementation For nested set, validate the lft, rgt against child <-> parent For materialized path validate path against child <-> parent.
Implements ilTreeImplementation.
Definition at line 963 of file class.ilNestedSetTree.php.
References $query, $res, and ilDBConstants\FETCHMODE_ASSOC.
|
protected |
Definition at line 15 of file class.ilNestedSetTree.php.
|
protected |
Definition at line 14 of file class.ilNestedSetTree.php.
Referenced by getTree().