ILIAS
Release_5_0_x_branch Revision 61816
|
Base class for nested set path based trees. More...
Public Member Functions | |
__construct (ilTree $a_tree) | |
Constructor. | |
getTree () | |
Get tree object. | |
getSubTreeIds ($a_node_id) | |
Get subtree ids. | |
getSubTreeQuery ($a_node, $a_types= '', $a_force_join_reference=true, $a_fields=array()) | |
Get subtree. | |
getRelation ($a_node_a, $a_node_b) | |
Get relation. | |
getPathIds ($a_endnode, $a_startnode=0) | |
Get path ids. | |
insertNode ($a_node_id, $a_parent_id, $a_pos) | |
Insert tree node. | |
deleteTree ($a_node_id) | |
Delete a subtree. | |
moveToTrash ($a_node_id) | |
Move to trash. | |
getPathIdsUsingNestedSets ($a_endnode_id, $a_startnode_id=0) | |
get path from a given startnode to a given endnode if startnode is not given the rootnode is startnode public | |
moveTree ($a_source_id, $a_target_id, $a_position) | |
Move source subtree to target. | |
getSubtreeInfo ($a_endnode_id) | |
Get rbac subtree info type $ilDB. |
Protected Member Functions | |
getPathIdsUsingAdjacencyMap ($a_endnode_id, $a_startnode_id=0) | |
get path from a given startnode to a given endnode if startnode is not given the rootnode is startnode public |
Private Attributes | |
$tree = NULL |
Base class for nested set path based trees.
Definition at line 16 of file class.ilNestedSetTree.php.
ilNestedSetTree::__construct | ( | ilTree | $a_tree | ) |
Constructor.
ilTree | $tree |
Definition at line 24 of file class.ilNestedSetTree.php.
ilNestedSetTree::deleteTree | ( | $a_node_id | ) |
Delete a subtree.
type | $a_node_id |
Implements ilTreeImplementation.
Definition at line 402 of file class.ilNestedSetTree.php.
References $ilDB, $query, $res, DB_FETCHMODE_ASSOC, getTree(), and ilDB\LOCK_WRITE.
ilNestedSetTree::getPathIds | ( | $a_endnode, | |
$a_startnode = 0 |
|||
) |
Get path ids.
int | $a_endnode | |
int | $a_startnode |
Implements ilTreeImplementation.
Definition at line 156 of file class.ilNestedSetTree.php.
References getPathIdsUsingAdjacencyMap().
|
protected |
get path from a given startnode to a given endnode if startnode is not given the rootnode is startnode public
integer | node_id of endnode |
integer | node_id of startnode (optional) |
Definition at line 497 of file class.ilNestedSetTree.php.
References $ilDB, $query, $res, $row, getPathIdsUsingNestedSets(), and getTree().
Referenced by getPathIds().
ilNestedSetTree::getPathIdsUsingNestedSets | ( | $a_endnode_id, | |
$a_startnode_id = 0 |
|||
) |
get path from a given startnode to a given endnode if startnode is not given the rootnode is startnode public
integer | node_id of endnode |
integer | node_id of startnode (optional) |
Definition at line 620 of file class.ilNestedSetTree.php.
References $ilDB, $query, $res, $row, and getTree().
Referenced by getPathIdsUsingAdjacencyMap().
ilNestedSetTree::getRelation | ( | $a_node_a, | |
$a_node_b | |||
) |
Get relation.
type | $a_node_a | |
type | $a_node_b |
Implements ilTreeImplementation.
Definition at line 123 of file class.ilNestedSetTree.php.
References $GLOBALS, ilTree\RELATION_CHILD, ilTree\RELATION_EQUALS, ilTree\RELATION_NONE, ilTree\RELATION_PARENT, and ilTree\RELATION_SIBLING.
ilNestedSetTree::getSubTreeIds | ( | $a_node_id | ) |
Get subtree ids.
type | $a_node_id |
Implements ilTreeImplementation.
Definition at line 42 of file class.ilNestedSetTree.php.
References $ilDB, $query, $res, $row, DB_FETCHMODE_OBJECT, and getTree().
ilNestedSetTree::getSubtreeInfo | ( | $a_endnode_id | ) |
Get rbac subtree info type $ilDB.
type | $a_endnode_id |
Implements ilTreeImplementation.
Definition at line 795 of file class.ilNestedSetTree.php.
References $GLOBALS, $ilDB, $query, $res, $row, DB_FETCHMODE_OBJECT, and getTree().
ilNestedSetTree::getSubTreeQuery | ( | $a_node, | |
$a_types = '' , |
|||
$a_force_join_reference = true , |
|||
$a_fields = array() |
|||
) |
Get subtree.
type | $a_node | |
type | $a_with_data | |
type | $a_types |
Implements ilTreeImplementation.
Definition at line 72 of file class.ilNestedSetTree.php.
References $ilDB, $query, and getTree().
ilNestedSetTree::getTree | ( | ) |
Get tree object.
Definition at line 33 of file class.ilNestedSetTree.php.
References $tree.
Referenced by deleteTree(), getPathIdsUsingAdjacencyMap(), getPathIdsUsingNestedSets(), getSubTreeIds(), getSubtreeInfo(), getSubTreeQuery(), insertNode(), moveToTrash(), and moveTree().
ilNestedSetTree::insertNode | ( | $a_node_id, | |
$a_parent_id, | |||
$a_pos | |||
) |
Insert tree node.
type | $a_node_id | |
type | $a_parent_id | |
type | $a_pos |
Implements ilTreeImplementation.
Definition at line 167 of file class.ilNestedSetTree.php.
References $GLOBALS, $ilDB, $query, $res, getTree(), IL_LAST_NODE, ilDB\LOCK_WRITE, and ilTree\POS_FIRST_NODE.
ilNestedSetTree::moveToTrash | ( | $a_node_id | ) |
Move to trash.
type | $a_node_id |
Implements ilTreeImplementation.
Definition at line 473 of file class.ilNestedSetTree.php.
References $ilDB, $query, and getTree().
ilNestedSetTree::moveTree | ( | $a_source_id, | |
$a_target_id, | |||
$a_position | |||
) |
Move source subtree to target.
type | $a_source_id | |
type | $a_target_id | |
type | $a_position |
Implements ilTreeImplementation.
Definition at line 662 of file class.ilNestedSetTree.php.
References $GLOBALS, $ilDB, $query, $res, $row, getTree(), and ilDB\LOCK_WRITE.
|
private |
Definition at line 18 of file class.ilNestedSetTree.php.
Referenced by getTree().