|
ILIAS
Release_4_2_x_branch Revision 61807
|
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco. More...
Inheritance diagram for ilTree:
Collaboration diagram for ilTree:Public Member Functions | |
| ilTree ($a_tree_id, $a_root_id=0) | |
| Constructor public. | |
| useCache ($a_use=true) | |
| Use Cache (usually activated) | |
| isCacheUsed () | |
| Check if cache is active. | |
| initLangCode () | |
| Store user language. | |
| setTableNames ($a_table_tree, $a_table_obj_data, $a_table_obj_reference="") | |
| set table names The primary key of the table containing your object_data must be 'obj_id' You may use a reference table. | |
| setReferenceTablePK ($a_column_name) | |
| set column containing primary key in reference table public | |
| setObjectTablePK ($a_column_name) | |
| set column containing primary key in object table public | |
| setTreeTablePK ($a_column_name) | |
| set column containing primary key in tree table public | |
| buildJoin () | |
| build join depending on table settings private | |
| getChilds ($a_node_id, $a_order="", $a_direction="ASC") | |
| get child nodes of given node public | |
| getFilteredChilds ($a_filter, $a_node, $a_order="", $a_direction="ASC") | |
| get child nodes of given node (exclude filtered obj_types) public | |
| getChildsByType ($a_node_id, $a_type) | |
| get child nodes of given node by object type public | |
| getChildsByTypeFilter ($a_node_id, $a_types) | |
| get child nodes of given node by object type public | |
| insertNode ($a_node_id, $a_parent_id, $a_pos=IL_LAST_NODE, $a_reset_deletion_date=false) | |
| insert new node with node_id under parent node with parent_id public | |
| getFilteredSubTree ($a_node_id, $a_filter=array()) | |
| get filtered subtree | |
| getSubTreeIds ($a_ref_id) | |
| Get all ids of subnodes. | |
| getSubTree ($a_node, $a_with_data=true, $a_type="") | |
| get all nodes in the subtree under specified node | |
| getSubTreeTypes ($a_node, $a_filter=0) | |
| get types of nodes in the subtree under specified node | |
| deleteTree ($a_node) | |
| delete node and the whole subtree under this node public | |
| getPathFull ($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. | |
| 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 | |
| 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 | |
| preloadDepthParent ($a_node_ids) | |
| Preload depth/parent. | |
| getPathId ($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 | |
| getNodePathForTitlePath ($titlePath, $a_startnode_id=null) | |
| Converts a path consisting of object titles into a path consisting of tree nodes. | |
| getNodePath ($a_endnode_id, $a_startnode_id=0) | |
| Returns the node path for the specified object reference. | |
| checkTree () | |
| check consistence of tree all left & right values are checked if they are exists only once public | |
| checkTreeChilds ($a_no_zero_child=true) | |
| check, if all childs of tree nodes exist in object table | |
| getMaximumDepth () | |
| Return the maximum depth in tree public. | |
| getDepth ($a_node_id) | |
| return depth of a node in tree private | |
| getNodeData ($a_node_id, $a_tree_pk=null) | |
| get all information of a node. | |
| fetchNodeData ($a_row) | |
| get data of parent node from tree and object_data private | |
| isInTree ($a_node_id) | |
| get all information of a node. | |
| getParentNodeData ($a_node_id) | |
| get data of parent node from tree and object_data public | |
| isGrandChild ($a_startnode_id, $a_querynode_id) | |
| checks if a node is in the path of an other node public | |
| addTree ($a_tree_id, $a_node_id=-1) | |
| create a new tree to do: ??? | |
| getNodeDataByType ($a_type) | |
| get nodes by type // TODO: method needs revision | |
| removeTree ($a_tree_id) | |
| remove an existing tree | |
| saveSubTree ($a_node_id, $a_set_deleted=false) | |
| save subtree: delete a subtree (defined by node_id) to a new tree with $this->tree_id -node_id. | |
| isDeleted ($a_node_id) | |
| This is a wrapper for isSaved() with a more useful name. | |
| isSaved ($a_node_id) | |
| check if node is saved | |
| preloadDeleted ($a_node_ids) | |
| Preload deleted information. | |
| getSavedNodeData ($a_parent_id) | |
| get data saved/deleted nodes | |
| getParentId ($a_node_id) | |
| get parent id of given node public | |
| getLeftValue ($a_node_id) | |
| get left value of given node public | |
| getChildSequenceNumber ($a_node, $type="") | |
| get sequence number of node in sibling sequence public | |
| readRootId () | |
| read root id from database | |
| getRootId () | |
| get the root id of tree public | |
| setRootId ($a_root_id) | |
| getTreeId () | |
| get tree id public | |
| setTreeId ($a_tree_id) | |
| set tree id public | |
| fetchSuccessorNode ($a_node_id, $a_type="") | |
| get node data of successor node | |
| fetchPredecessorNode ($a_node_id, $a_type="") | |
| get node data of predecessor node | |
| renumber ($node_id=1, $i=1) | |
| Wrapper for renumber. | |
| __renumber ($node_id=1, $i=1) | |
| This method is private. | |
| checkForParentType ($a_ref_id, $a_type, $a_exclude_source_check=false) | |
| Check for parent type e.g check if a folder (ref_id 3) is in a parent course obj => checkForParentType(3,'crs');. | |
| _removeEntry ($a_tree, $a_child, $a_db_table="tree") | |
| STATIC METHOD Removes a single entry from a tree. | |
| __isMainTree () | |
| Check if operations are done on main tree. | |
| __checkDelete ($a_node) | |
| Check for deleteTree() compares a subtree of a given node by checking lft, rgt against parent relation. | |
| __getSubTreeByParentRelation ($a_node_id, &$parent_childs) | |
| __validateSubtrees (&$lft_childs, $parent_childs) | |
| moveTree ($a_source_id, $a_target_id, $a_location=IL_LAST_NODE) | |
| Move Tree Implementation. | |
| getRbacSubtreeInfo ($a_endnode_id) | |
| This method is used for change existing objects and returns all necessary information for this action. | |
Data Fields | |
| $ilias | |
| $log | |
| $root_id | |
| $tree_id | |
| $table_tree | |
| $table_obj_data | |
| $table_obj_reference | |
| $ref_pk | |
| $obj_pk | |
| $tree_pk | |
| $gap | |
Protected Member Functions | |
| fetchTranslationFromObjectDataCache ($a_obj_ids) | |
| Get translation data from object cache (trigger in object cache on preload) | |
Protected Attributes | |
| $depth_cache = array() | |
| $parent_cache = array() | |
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco.
Definition at line 21 of file class.ilTree.php.
| ilTree::__checkDelete | ( | $a_node | ) |
Check for deleteTree() compares a subtree of a given node by checking lft, rgt against parent relation.
private
| array | node data from ilTree::getNodeData() |
Definition at line 2877 of file class.ilTree.php.
References $ilDB, $query, $res, $row, __getSubTreeByParentRelation(), and __validateSubtrees().
Referenced by deleteTree().
Here is the call graph for this function:
Here is the caller graph for this function:| ilTree::__getSubTreeByParentRelation | ( | $a_node_id, | |
| & | $parent_childs | ||
| ) |
Definition at line 2916 of file class.ilTree.php.
References $ilDB, $query, $res, and $row.
Referenced by __checkDelete().
Here is the caller graph for this function:| ilTree::__isMainTree | ( | ) |
Check if operations are done on main tree.
private
Definition at line 2864 of file class.ilTree.php.
Referenced by addTree(), checkForParentType(), deleteTree(), getChilds(), getNodeData(), getPathFull(), getPathId(), getPathIdsUsingAdjacencyMap(), getSubTree(), insertNode(), isCacheUsed(), isInTree(), isSaved(), moveTree(), preloadDeleted(), preloadDepthParent(), removeTree(), renumber(), and saveSubTree().
Here is the caller graph for this function:| ilTree::__renumber | ( | $node_id = 1, |
|
$i = 1 |
|||
| ) |
This method is private.
Always call ilTree->renumber() since it locks the tree table renumber left/right values and close the gaps in numbers (recursive) private
| integer | node_id where to start (usually the root node) |
| integer | first left value of start node (usually 1) |
Definition at line 2727 of file class.ilTree.php.
References $ilDB, $query, $res, and getChilds().
Referenced by renumber().
Here is the call graph for this function:
Here is the caller graph for this function:| ilTree::__validateSubtrees | ( | & | $lft_childs, |
| $parent_childs | |||
| ) |
Definition at line 2957 of file class.ilTree.php.
Referenced by __checkDelete().
Here is the caller graph for this function:| ilTree::_removeEntry | ( | $a_tree, | |
| $a_child, | |||
$a_db_table = "tree" |
|||
| ) |
STATIC METHOD Removes a single entry from a tree.
The tree structure is NOT updated!
public
| integer | tree id |
| integer | child id |
| string | db_table name. default is 'tree' (optional) |
Definition at line 2831 of file class.ilTree.php.
References $ilDB, $ilErr, $ilLog, $query, and $res.
Referenced by ilValidator\purgeObjects().
Here is the caller graph for this function:| ilTree::addTree | ( | $a_tree_id, | |
$a_node_id = -1 |
|||
| ) |
create a new tree to do: ???
| integer | a_tree_id: obj_id of object where tree belongs to |
| integer | a_node_id: root node of tree (optional; default is tree_id itself) |
Definition at line 2045 of file class.ilTree.php.
References $ilDB, $query, $res, and __isMainTree().
Referenced by ilWorkspaceExplorer\__construct(), and ilSCORMPackageParser\handlerBeginTag().
Here is the call graph for this function:
Here is the caller graph for this function:| ilTree::buildJoin | ( | ) |
build join depending on table settings private
Definition at line 309 of file class.ilTree.php.
Referenced by fetchPredecessorNode(), fetchSuccessorNode(), getChildsByTypeFilter(), getChildSequenceNumber(), getNodeData(), getNodeDataByType(), getPathFull(), getSavedNodeData(), and getSubTree().
Here is the caller graph for this function:| ilTree::checkForParentType | ( | $a_ref_id, | |
| $a_type, | |||
$a_exclude_source_check = false |
|||
| ) |
Check for parent type e.g check if a folder (ref_id 3) is in a parent course obj => checkForParentType(3,'crs');.
public
| integer | ref_id |
| string | type |
Definition at line 2769 of file class.ilTree.php.
References $path, __isMainTree(), getPathFull(), isCacheUsed(), and isInTree().
Here is the call graph for this function:| ilTree::checkTree | ( | ) |
check consistence of tree all left & right values are checked if they are exists only once public
Definition at line 1587 of file class.ilTree.php.
References $ilDB, $query, $res, and $row.
| ilTree::checkTreeChilds | ( | $a_no_zero_child = true | ) |
check, if all childs of tree nodes exist in object table
Definition at line 1620 of file class.ilTree.php.
References $ilDB, $query, and $row.
| ilTree::deleteTree | ( | $a_node | ) |
delete node and the whole subtree under this node public
| array | node_data of a node |
Definition at line 1012 of file class.ilTree.php.
References $ilDB, $query, $res, $row, __checkDelete(), __isMainTree(), and ilDB\LOCK_WRITE.
Referenced by ilWorkspaceTree\cascadingDelete().
Here is the call graph for this function:
Here is the caller graph for this function:| ilTree::fetchNodeData | ( | $a_row | ) |
get data of parent node from tree and object_data private
| object | db db result object containing node_data |
Definition at line 1791 of file class.ilTree.php.
References $data, $ilBench, $ilDB, $lng, $query, $res, $row, ilContainerReference\_lookupTargetTitle(), isCacheUsed(), and ilUtil\shortenText().
Referenced by fetchPredecessorNode(), fetchSuccessorNode(), ilSCORMTree\getChilds(), getChilds(), getChildsByType(), getChildsByTypeFilter(), getNodeData(), getNodeDataByType(), getParentNodeData(), getPathFull(), getSavedNodeData(), and getSubTree().
Here is the call graph for this function:
Here is the caller graph for this function:| ilTree::fetchPredecessorNode | ( | $a_node_id, | |
$a_type = "" |
|||
| ) |
get node data of predecessor node
public
| integer | node id |
Definition at line 2618 of file class.ilTree.php.
References $ilDB, $query, $res, $row, buildJoin(), and fetchNodeData().
Here is the call graph for this function:| ilTree::fetchSuccessorNode | ( | $a_node_id, | |
$a_type = "" |
|||
| ) |
get node data of successor node
public
| integer | node id |
Definition at line 2554 of file class.ilTree.php.
References $ilDB, $query, $res, $row, buildJoin(), and fetchNodeData().
Referenced by ilSCORMPresentationGUI\finishSahs().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Get translation data from object cache (trigger in object cache on preload)
| array | $a_obj_ids | object ids |
Definition at line 1887 of file class.ilTree.php.
References isCacheUsed().
Referenced by getChilds().
Here is the call graph for this function:
Here is the caller graph for this function:| ilTree::getChilds | ( | $a_node_id, | |
$a_order = "", |
|||
$a_direction = "ASC" |
|||
| ) |
get child nodes of given node public
| integer | node_id |
| string | sort order of returned childs, optional (possible values: 'title','desc','last_update' or 'type') |
| string | sort direction, optional (possible values: 'DESC' or 'ASC'; defalut is 'ASC') |
Reimplemented in ilSCORMTree.
Definition at line 332 of file class.ilTree.php.
References $ilBench, $ilDB, $query, $res, $row, __isMainTree(), fetchNodeData(), fetchTranslationFromObjectDataCache(), and isCacheUsed().
Referenced by __renumber(), getFilteredChilds(), and ilObjWorkspaceFolderTableGUI\getItems().
Here is the call graph for this function:
Here is the caller graph for this function:| ilTree::getChildsByType | ( | $a_node_id, | |
| $a_type | |||
| ) |
get child nodes of given node by object type public
| integer | node_id |
| string | object type |
Definition at line 441 of file class.ilTree.php.
References $ilDB, $query, $res, $row, and fetchNodeData().
Here is the call graph for this function:| ilTree::getChildsByTypeFilter | ( | $a_node_id, | |
| $a_types | |||
| ) |
get child nodes of given node by object type public
| integer | node_id |
| array | array of object type |
Definition at line 495 of file class.ilTree.php.
References $ilDB, $query, $res, $row, buildJoin(), fetchNodeData(), and ilUtil\quoteArray().
Here is the call graph for this function:| ilTree::getChildSequenceNumber | ( | $a_node, | |
$type = "" |
|||
| ) |
get sequence number of node in sibling sequence public
| array | node |
Definition at line 2450 of file class.ilTree.php.
References $ilDB, $query, $res, $row, and buildJoin().
Here is the call graph for this function:| ilTree::getDepth | ( | $a_node_id | ) |
return depth of a node in tree private
| integer | node_id of parent's node_id |
Definition at line 1716 of file class.ilTree.php.
References $ilDB, $query, $res, and $row.
Referenced by insertNode().
Here is the caller graph for this function:| ilTree::getFilteredChilds | ( | $a_filter, | |
| $a_node, | |||
$a_order = "", |
|||
$a_direction = "ASC" |
|||
| ) |
get child nodes of given node (exclude filtered obj_types) public
| array | objects to filter (e.g array('rolf')) |
| integer | node_id |
| string | sort order of returned childs, optional (possible values: 'title','desc','last_update' or 'type') |
| string | sort direction, optional (possible values: 'DESC' or 'ASC'; defalut is 'ASC') |
Definition at line 419 of file class.ilTree.php.
References getChilds().
Here is the call graph for this function:| ilTree::getFilteredSubTree | ( | $a_node_id, | |
$a_filter = array() |
|||
| ) |
get filtered subtree
get all subtree nodes beginning at a specific node excluding specific object types and their child nodes.
E.g getFilteredSubTreeNodes()
public
| @return |
Definition at line 845 of file class.ilTree.php.
References getNodeData(), and getSubTree().
Here is the call graph for this function:| ilTree::getLeftValue | ( | $a_node_id | ) |
get left value of given node public
| integer | node id |
Definition at line 2425 of file class.ilTree.php.
| ilTree::getMaximumDepth | ( | ) |
Return the maximum depth in tree public.
Definition at line 1699 of file class.ilTree.php.
| ilTree::getNodeData | ( | $a_node_id, | |
$a_tree_pk = null |
|||
| ) |
get all information of a node.
get data of a specific node from tree and object_data public
| integer | node id |
Definition at line 1746 of file class.ilTree.php.
References $GLOBALS, $ilDB, $query, $res, $row, $tree_id, $tree_pk, __isMainTree(), buildJoin(), and fetchNodeData().
Referenced by ilWorkspaceTree\cascadingDelete(), getFilteredSubTree(), ilPortfolioPageTableGUI\getItems(), ilExAssignmentGUI\getOverviewBody(), ilOrgUnitTree\getRecursiveOrgUnitTree(), getSubTreeTypes(), ilObjPortfolioGUI\initBlogForm(), ilPCBlogGUI\initForm(), ilPCVerificationGUI\initForm(), ilObjPortfolioGUI\initForm(), ilPCFileListGUI\insertNewFileItem(), ilPCFileItemGUI\insertNewItemAfter(), ilPCFileItemGUI\insertNewItemBefore(), and ilPCFileListGUI\selectFile().
Here is the call graph for this function:
Here is the caller graph for this function:| ilTree::getNodeDataByType | ( | $a_type | ) |
get nodes by type // TODO: method needs revision
| integer | a_tree_id: obj_id of object where tree belongs to |
| integer | a_type_id: type of object public |
Definition at line 2092 of file class.ilTree.php.
References $data, $ilDB, $query, $res, $row, buildJoin(), and fetchNodeData().
Here is the call graph for this function:| ilTree::getNodePath | ( | $a_endnode_id, | |
$a_startnode_id = 0 |
|||
| ) |
Returns the node path for the specified object reference.
Note: this function returns the same result as getNodePathForTitlePath, but takes ref-id's as parameters.
This function differs from getPathFull, in the following aspects:
public
| integer | node_id of endnode |
| integer | node_id of startnode (optional) |
Definition at line 1542 of file class.ilTree.php.
References $data, $ilDB, $query, $res, $row, and getPathId().
Referenced by getNodePathForTitlePath().
Here is the call graph for this function:
Here is the caller graph for this function:| ilTree::getNodePathForTitlePath | ( | $titlePath, | |
$a_startnode_id = null |
|||
| ) |
Converts a path consisting of object titles into a path consisting of tree nodes.
The comparison is non-case sensitive.
Note: this function returns the same result as getNodePath, but takes a title path as parameter.
public
| Array | Path array with object titles. e.g. array('ILIAS','English','Course A') |
| ref_id | Startnode of the relative path. Specify null, if the title path is an absolute path. Specify a ref id, if the title path is a relative path starting at this ref id. |
Definition at line 1419 of file class.ilTree.php.
References $ilDB, $log, $obj_pk, $row, DB_FETCHMODE_ASSOC, getNodePath(), ilStr\strToLower(), and UtfNormal\toNFC().
Here is the call graph for this function:| ilTree::getParentId | ( | $a_node_id | ) |
get parent id of given node public
| integer | node id |
Definition at line 2399 of file class.ilTree.php.
| ilTree::getParentNodeData | ( | $a_node_id | ) |
get data of parent node from tree and object_data public
| integer | node id |
Definition at line 1963 of file class.ilTree.php.
References $ilDB, $ilLog, $query, $res, $row, and fetchNodeData().
Here is the call graph for this function:| ilTree::getPathFull | ( | $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.
This function chooses the algorithm to be used.
public
| integer | node_id of endnode |
| integer | node_id of startnode (optional) |
Definition at line 1125 of file class.ilTree.php.
References $ilDB, $row, __isMainTree(), buildJoin(), DB_FETCHMODE_ASSOC, fetchNodeData(), getPathId(), and ilDB\quote().
Referenced by checkForParentType(), and ilSkillTree\getSkillTreePath().
Here is the call graph for this function:
Here is the caller graph for this function:| ilTree::getPathId | ( | $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 1382 of file class.ilTree.php.
References __isMainTree(), getPathIdsUsingAdjacencyMap(), and isCacheUsed().
Referenced by getNodePath(), and getPathFull().
Here is the call graph for this function:
Here is the caller graph for this function:| ilTree::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
| integer | node_id of endnode |
| integer | node_id of startnode (optional) |
Definition at line 1223 of file class.ilTree.php.
References $data, $ilDB, $log, $query, $res, $root_id, $row, $tree_id, __isMainTree(), and getPathIdsUsingNestedSets().
Referenced by getPathId().
Here is the call graph for this function:
Here is the caller graph for this function:| ilTree::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 1176 of file class.ilTree.php.
References $data, $ilDB, $query, $res, and $row.
Referenced by getPathIdsUsingAdjacencyMap().
Here is the caller graph for this function:| ilTree::getRbacSubtreeInfo | ( | $a_endnode_id | ) |
This method is used for change existing objects and returns all necessary information for this action.
The former use of ilTree::getSubtree needs to much memory.
| ref_id | ref_id of source node |
Definition at line 3142 of file class.ilTree.php.
References $ilDB, $query, $res, $row, and DB_FETCHMODE_OBJECT.
| ilTree::getRootId | ( | ) |
get the root id of tree public
Definition at line 2518 of file class.ilTree.php.
References $root_id.
Referenced by ilPCBlogGUI\initForm(), and ilPCVerificationGUI\initForm().
Here is the caller graph for this function:| ilTree::getSavedNodeData | ( | $a_parent_id | ) |
get data saved/deleted nodes
| integer | id of parent object of saved object public |
Definition at line 2368 of file class.ilTree.php.
References $ilDB, $query, $res, $row, buildJoin(), and fetchNodeData().
Here is the call graph for this function:| ilTree::getSubTree | ( | $a_node, | |
$a_with_data = true, |
|||
$a_type = "" |
|||
| ) |
get all nodes in the subtree under specified node
public
| array | node_data |
| boolean | with data: default is true otherwise this function return only a ref_id array |
Definition at line 906 of file class.ilTree.php.
References $data, $ilDB, $query, $res, $row, __isMainTree(), buildJoin(), exit, and fetchNodeData().
Referenced by ilWorkspaceTree\cascadingDelete(), getFilteredSubTree(), and ilOrgUnitTree\getRecursiveOrgUnitTree().
Here is the call graph for this function:
Here is the caller graph for this function:| ilTree::getSubTreeIds | ( | $a_ref_id | ) |
Get all ids of subnodes.
| object | $a_ref_id |
Definition at line 875 of file class.ilTree.php.
References $ilDB, $query, $res, $row, and DB_FETCHMODE_OBJECT.
| ilTree::getSubTreeTypes | ( | $a_node, | |
$a_filter = 0 |
|||
| ) |
get types of nodes in the subtree under specified node
public
| array | node_id |
| array | object types to filter e.g array('rolf') |
Definition at line 992 of file class.ilTree.php.
References getNodeData().
Here is the call graph for this function:| ilTree::getTreeId | ( | ) |
get tree id public
Definition at line 2532 of file class.ilTree.php.
References $tree_id.
Referenced by ilWorkspaceExplorer\__construct().
Here is the caller graph for this function:| ilTree::ilTree | ( | $a_tree_id, | |
$a_root_id = 0 |
|||
| ) |
Constructor public.
| integer | $a_tree_id | tree_id |
| integer | $a_root_id | root_id (optional) |
Definition at line 130 of file class.ilTree.php.
References $ilDB, $ilErr, $ilias, $ilLog, and PEAR_ERROR_CALLBACK.
Referenced by ilAICCTree\ilAICCTree(), and ilSCORMTree\ilSCORMTree().
Here is the caller graph for this function:| ilTree::initLangCode | ( | ) |
Store user language.
This function is used by the "main" tree only (during initialisation).
Definition at line 208 of file class.ilTree.php.
| ilTree::insertNode | ( | $a_node_id, | |
| $a_parent_id, | |||
$a_pos = IL_LAST_NODE, |
|||
$a_reset_deletion_date = false |
|||
| ) |
insert new node with node_id under parent node with parent_id public
| integer | node_id |
| integer | parent_id |
| integer | IL_LAST_NODE | IL_FIRST_NODE | node id of preceding child |
Definition at line 534 of file class.ilTree.php.
References $ilDB, $query, $res, __isMainTree(), ilObject\_resetDeletedDate(), getDepth(), IL_FIRST_NODE, IL_LAST_NODE, isInTree(), and ilDB\LOCK_WRITE.
Referenced by ilWorkspaceTree\insertObject().
Here is the call graph for this function:
Here is the caller graph for this function:| ilTree::isCacheUsed | ( | ) |
Check if cache is active.
Definition at line 199 of file class.ilTree.php.
References __isMainTree().
Referenced by checkForParentType(), fetchNodeData(), fetchTranslationFromObjectDataCache(), getChilds(), getPathId(), isInTree(), isSaved(), preloadDeleted(), and preloadDepthParent().
Here is the call graph for this function:
Here is the caller graph for this function:| ilTree::isDeleted | ( | $a_node_id | ) |
This is a wrapper for isSaved() with a more useful name.
Definition at line 2281 of file class.ilTree.php.
References isSaved().
Here is the call graph for this function:| ilTree::isGrandChild | ( | $a_startnode_id, | |
| $a_querynode_id | |||
| ) |
checks if a node is in the path of an other node public
| integer | object id of start node |
| integer | object id of query node |
Definition at line 2009 of file class.ilTree.php.
References $ilDB, $query, and $res.
| ilTree::isInTree | ( | $a_node_id | ) |
get all information of a node.
get data of a specific node from tree and object_data public
| integer | node id |
Definition at line 1911 of file class.ilTree.php.
References $ilDB, $query, $res, __isMainTree(), and isCacheUsed().
Referenced by checkForParentType(), and insertNode().
Here is the call graph for this function:
Here is the caller graph for this function:| ilTree::isSaved | ( | $a_node_id | ) |
check if node is saved
Definition at line 2289 of file class.ilTree.php.
References $ilDB, $query, $res, $row, __isMainTree(), and isCacheUsed().
Referenced by isDeleted().
Here is the call graph for this function:
Here is the caller graph for this function:| ilTree::moveTree | ( | $a_source_id, | |
| $a_target_id, | |||
$a_location = IL_LAST_NODE |
|||
| ) |
Move Tree Implementation.
public
| int | source ref_id |
| int | target ref_id |
| int | location IL_LAST_NODE or IL_FIRST_NODE (IL_FIRST_NODE not implemented yet) |
Definition at line 3002 of file class.ilTree.php.
References $ilDB, $query, $res, $row, __isMainTree(), and ilDB\LOCK_WRITE.
Here is the call graph for this function:| ilTree::preloadDeleted | ( | $a_node_ids | ) |
Preload deleted information.
| @return |
Definition at line 2329 of file class.ilTree.php.
References $ilDB, $query, $res, $row, __isMainTree(), and isCacheUsed().
Here is the call graph for this function:| ilTree::preloadDepthParent | ( | $a_node_ids | ) |
Preload depth/parent.
| @return |
Definition at line 1354 of file class.ilTree.php.
References $ilDB, $res, $row, __isMainTree(), and isCacheUsed().
Here is the call graph for this function:| ilTree::readRootId | ( | ) |
read root id from database
| root_id | public |
Definition at line 2498 of file class.ilTree.php.
References $ilDB, $query, $res, $root_id, and $row.
Referenced by ilWorkspaceTree\__construct(), ilWorkspaceExplorer\__construct(), ilWorkspaceTree\cascadingDelete(), ilWorkspaceAccessHandler\checkAccessOfUser(), ilHACPPresentationGUI\explorer(), ilAICCPresentationGUI\explorer(), ilSAHSPresentationGUI\explorer(), ilSCORMPresentationGUI\explorer(), ilPortfolioPageTableGUI\getItems(), ilAICCExplorer\ilAICCExplorer(), ilHACPExplorer\ilHACPExplorer(), ilSCORMExplorer\ilSCORMExplorer(), ilObjPortfolioGUI\initBlogForm(), and ilObjPortfolioGUI\initForm().
Here is the caller graph for this function:| ilTree::removeTree | ( | $a_tree_id | ) |
remove an existing tree
| integer | a_tree_id: tree to be removed |
Definition at line 2148 of file class.ilTree.php.
References $ilDB, $query, $res, and __isMainTree().
Here is the call graph for this function:| ilTree::renumber | ( | $node_id = 1, |
|
$i = 1 |
|||
| ) |
Wrapper for renumber.
This method locks the table tree (recursive) public
| integer | node_id where to start (usually the root node) |
| integer | first left value of start node (usually 1) |
Definition at line 2683 of file class.ilTree.php.
References $ilDB, __isMainTree(), __renumber(), and ilDB\LOCK_WRITE.
Here is the call graph for this function:| ilTree::saveSubTree | ( | $a_node_id, | |
$a_set_deleted = false |
|||
| ) |
save subtree: delete a subtree (defined by node_id) to a new tree with $this->tree_id -node_id.
This is neccessary for undelete functionality
| integer | node_id |
Definition at line 2179 of file class.ilTree.php.
References $ilDB, $query, $res, $row, __isMainTree(), ilObject\_setDeletedDate(), and ilDB\LOCK_WRITE.
Here is the call graph for this function:| ilTree::setObjectTablePK | ( | $a_column_name | ) |
set column containing primary key in object table public
| string | column name |
Definition at line 276 of file class.ilTree.php.
| ilTree::setReferenceTablePK | ( | $a_column_name | ) |
set column containing primary key in reference table public
| string | column name |
Definition at line 259 of file class.ilTree.php.
| ilTree::setRootId | ( | $a_root_id | ) |
Definition at line 2522 of file class.ilTree.php.
Referenced by ilWorkspaceExplorer\__construct().
Here is the caller graph for this function:| ilTree::setTableNames | ( | $a_table_tree, | |
| $a_table_obj_data, | |||
$a_table_obj_reference = "" |
|||
| ) |
set table names The primary key of the table containing your object_data must be 'obj_id' You may use a reference table.
If no reference table is specified the given tree table is directly joined with the given object_data table. The primary key in object_data table and its foreign key in reference table must have the same name!
| string | table name of tree table |
| string | table name of object_data table |
| string | table name of object_reference table (optional) public |
Definition at line 238 of file class.ilTree.php.
Referenced by ilSkillTree\__construct(), ilSCORM2004Tree\__construct(), ilLMPageObject\_splitPage(), ilLMPageObject\_splitPageNext(), ilObjContentObjectGUI\explorer(), ilSCORM2004ScoGUI\getExportResources(), ilAICCTree\ilAICCTree(), ilLMEditorGUI\ilLMEditorGUI(), ilLMExplorer\ilLMExplorer(), ilLMPresentationGUI\ilLMPresentationGUI(), ilScorm2004EditorExplorer\ilScorm2004EditorExplorer(), ilSCORMTree\ilSCORMTree(), ilLMPresentationGUI\mapCurrentPageId(), ilMailFolderTableGUI\prepareHTML(), ilSCORM2004NodeGUI\putInTree(), ilLMObjectGUI\putInTree(), ilLMObject\putInTree(), ilSCORM2004ScoGUI\sahs_questions(), ilSCORM2004ScoGUI\sco_preview(), ilSCORM2004NodeGUI\setLocator(), ilMailFolderGUI\showFolder(), ilMailGUI\showMenu(), and ilObjSCORM2004LearningModuleGUI\showTree().
Here is the caller graph for this function:| ilTree::setTreeId | ( | $a_tree_id | ) |
set tree id public
Definition at line 2542 of file class.ilTree.php.
| ilTree::setTreeTablePK | ( | $a_column_name | ) |
set column containing primary key in tree table public
| string | column name |
Definition at line 293 of file class.ilTree.php.
Referenced by ilSkillTree\__construct(), ilSCORM2004Tree\__construct(), ilSCORM13Package\dbImportLM(), ilSCORM2004ScoGUI\getEditTree(), ilObjSCORM2004LearningModuleGUI\getEditTree(), ilAICCTree\ilAICCTree(), ilContObjParser\ilContObjParser(), ilSCORMTree\ilSCORMTree(), ilObjSCORM2004LearningModuleGUI\insertAsset(), ilObjSCORM2004LearningModuleGUI\insertChapter(), ilObjSCORM2004LearningModuleGUI\insertPage(), ilObjSCORM2004LearningModuleGUI\insertScenario(), ilObjSCORM2004LearningModuleGUI\insertSco(), ilObjSCORM2004LearningModuleGUI\insertTemplate(), and ilSCORM2004Node\putInTree().
Here is the caller graph for this function:| ilTree::useCache | ( | $a_use = true | ) |
Use Cache (usually activated)
Definition at line 190 of file class.ilTree.php.
|
protected |
Definition at line 120 of file class.ilTree.php.
| ilTree::$gap |
Definition at line 118 of file class.ilTree.php.
| ilTree::$ilias |
Definition at line 28 of file class.ilTree.php.
Referenced by ilTree().
| ilTree::$log |
Definition at line 36 of file class.ilTree.php.
Referenced by getNodePathForTitlePath(), and getPathIdsUsingAdjacencyMap().
| ilTree::$obj_pk |
Definition at line 85 of file class.ilTree.php.
Referenced by getNodePathForTitlePath(), and ilWorkspaceTree\lookupObjectId().
|
protected |
Definition at line 121 of file class.ilTree.php.
| ilTree::$ref_pk |
Definition at line 78 of file class.ilTree.php.
Referenced by ilWorkspaceTree\lookupNodeId().
| ilTree::$root_id |
Definition at line 43 of file class.ilTree.php.
Referenced by ilWorkspaceTree\cascadingDelete(), getPathIdsUsingAdjacencyMap(), getRootId(), and readRootId().
| ilTree::$table_obj_data |
Definition at line 64 of file class.ilTree.php.
| ilTree::$table_obj_reference |
Definition at line 71 of file class.ilTree.php.
| ilTree::$table_tree |
Definition at line 57 of file class.ilTree.php.
| ilTree::$tree_id |
Definition at line 50 of file class.ilTree.php.
Referenced by getNodeData(), getPathIdsUsingAdjacencyMap(), and getTreeId().
| ilTree::$tree_pk |
Definition at line 92 of file class.ilTree.php.
Referenced by getNodeData().