ILIAS
release_8 Revision v8.19
|
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...
Public Member Functions | |
__construct (int $a_tree_id, int $a_root_id=0, ilDBInterface $db=null) | |
initTreeImplementation () | |
Init tree implementation. More... | |
getTreeImplementation () | |
Get tree implementation. More... | |
useCache (bool $a_use=true) | |
Use Cache (usually activated) More... | |
isCacheUsed () | |
Check if cache is active. More... | |
getDepthCache () | |
Get depth cache. More... | |
getParentCache () | |
Get parent cache. More... | |
initLangCode () | |
Do not use it Store user language. More... | |
getTreeTable () | |
Get tree table name. More... | |
getObjectDataTable () | |
Get object data table. More... | |
getTreePk () | |
Get tree primary key. More... | |
getTableReference () | |
Get reference table if available. More... | |
getGap () | |
Get default gap. More... | |
resetInTreeCache () | |
reset in tree cache More... | |
setTableNames (string $a_table_tree, string $a_table_obj_data, string $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. More... | |
setReferenceTablePK (string $a_column_name) | |
set column containing primary key in reference table More... | |
setObjectTablePK (string $a_column_name) | |
set column containing primary key in object table More... | |
setTreeTablePK (string $a_column_name) | |
set column containing primary key in tree table More... | |
buildJoin () | |
build join depending on table settings private More... | |
getRelation (int $a_node_a, int $a_node_b) | |
Get relation of two nodes. More... | |
getRelationOfNodes (array $a_node_a_arr, array $a_node_b_arr) | |
get relation of two nodes by node data More... | |
getChildIds (int $a_node) | |
getChilds (int $a_node_id, string $a_order="", string $a_direction="ASC") | |
get child nodes of given node More... | |
getFilteredChilds (array $a_filter, int $a_node, string $a_order="", string $a_direction="ASC") | |
get child nodes of given node (exclude filtered obj_types) More... | |
getChildsByType (int $a_node_id, string $a_type) | |
get child nodes of given node by object type More... | |
getChildsByTypeFilter (int $a_node_id, array $a_types, string $a_order="", string $a_direction="ASC") | |
get child nodes of given node by object type More... | |
insertNodeFromTrash (int $a_source_id, int $a_target_id, int $a_tree_id, int $a_pos=self::POS_LAST_NODE, bool $a_reset_deleted_date=false) | |
Insert node from trash deletes trash entry. More... | |
insertNode (int $a_node_id, int $a_parent_id, int $a_pos=self::POS_LAST_NODE, bool $a_reset_deletion_date=false) | |
insert new node with node_id under parent node with parent_id More... | |
getFilteredSubTree (int $a_node_id, array $a_filter=[]) | |
get filtered subtree get all subtree nodes beginning at a specific node excluding specific object types and their child nodes. More... | |
getSubTreeIds (int $a_ref_id) | |
Get all ids of subnodes. More... | |
getSubTree (array $a_node, bool $a_with_data=true, array $a_type=[]) | |
get all nodes in the subtree under specified node More... | |
deleteTree (array $a_node) | |
delete node and the whole subtree under this node More... | |
validateParentRelations () | |
Validate parent relations of tree. More... | |
getPathFull (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... | |
preloadDepthParent (array $a_node_ids) | |
Preload depth/parent. More... | |
getPathId (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... | |
getNodePath (int $a_endnode_id, int $a_startnode_id=0) | |
Returns the node path for the specified object reference. More... | |
checkTree () | |
check consistence of tree all left & right values are checked if they are exists only once More... | |
checkTreeChilds (bool $a_no_zero_child=true) | |
check, if all childs of tree nodes exist in object table More... | |
getMaximumDepth () | |
Return the current maximum depth in the tree. More... | |
getDepth (int $a_node_id) | |
return depth of a node in tree More... | |
getNodeTreeData (int $a_node_id) | |
return all columns of tabel tree More... | |
getNodeData (int $a_node_id, ?int $a_tree_pk=null) | |
get all information of a node. More... | |
fetchNodeData (array $a_row) | |
get data of parent node from tree and object_data More... | |
isInTree (?int $a_node_id) | |
get all information of a node. More... | |
getParentNodeData (int $a_node_id) | |
get data of parent node from tree and object_data More... | |
isGrandChild (int $a_startnode_id, int $a_querynode_id) | |
checks if a node is in the path of an other node More... | |
addTree (int $a_tree_id, int $a_node_id=-1) | |
create a new tree to do: ??? More... | |
removeTree (int $a_tree_id) | |
remove an existing tree More... | |
moveToTrash (int $a_node_id, bool $a_set_deleted=false, int $a_deleted_by=0) | |
Move node to trash bin. More... | |
isDeleted (int $a_node_id) | |
This is a wrapper for isSaved() with a more useful name. More... | |
isSaved (int $a_node_id) | |
Use method isDeleted. More... | |
preloadDeleted (array $a_node_ids) | |
Preload deleted information. More... | |
getSavedNodeData (int $a_parent_id) | |
get data saved/deleted nodes More... | |
getSavedNodeObjIds (array $a_obj_ids) | |
get object id of saved/deleted nodes More... | |
getParentId (int $a_node_id) | |
get parent id of given node More... | |
getLeftValue (int $a_node_id) | |
get left value of given node More... | |
getChildSequenceNumber (array $a_node, string $type="") | |
get sequence number of node in sibling sequence More... | |
readRootId () | |
getRootId () | |
setRootId (int $a_root_id) | |
getTreeId () | |
setTreeId (int $a_tree_id) | |
fetchSuccessorNode (int $a_node_id, string $a_type="") | |
get node data of successor node More... | |
fetchPredecessorNode (int $a_node_id, string $a_type="") | |
get node data of predecessor node More... | |
renumber (int $node_id=1, int $i=1) | |
Wrapper for renumber. More... | |
checkForParentType (int $a_ref_id, string $a_type, bool $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');. More... | |
__isMainTree () | |
Check if operations are done on main tree. More... | |
__checkDelete (array $a_node) | |
Check for deleteTree() compares a subtree of a given node by checking lft, rgt against parent relation. More... | |
__getSubTreeByParentRelation (int $a_node_id, array &$parent_childs) | |
__validateSubtrees (array &$lft_childs, array $parent_childs) | |
moveTree (int $a_source_id, int $a_target_id, int $a_location=self::POS_LAST_NODE) | |
Move Tree Implementation public. More... | |
getRbacSubtreeInfo (int $a_endnode_id) | |
This method is used for change existing objects and returns all necessary information for this action. More... | |
getSubTreeQuery (int $a_node_id, array $a_fields=[], array $a_types=[], bool $a_force_join_reference=false) | |
Get tree subtree query. More... | |
getTrashSubTreeQuery (int $a_node_id, array $a_fields=[], array $a_types=[], bool $a_force_join_reference=false) | |
getSubTreeFilteredByObjIds (int $a_node_id, array $a_obj_ids, array $a_fields=[]) | |
get all node ids in the subtree under specified node id, filter by object ids More... | |
deleteNode (int $a_tree_id, int $a_node_id) | |
lookupTrashedObjectTypes () | |
Lookup object types in trash. More... | |
isRepositoryTree () | |
check if current tree instance operates on repository tree table More... | |
Static Public Member Functions | |
static | lookupTreesForNode (int $node_id) |
static | _removeEntry (int $a_tree, int $a_child, string $a_db_table="tree") |
STATIC METHOD Removes a single entry from a tree. More... | |
Data Fields | |
const | TREE_TYPE_MATERIALIZED_PATH = 'mp' |
const | TREE_TYPE_NESTED_SET = 'ns' |
const | POS_LAST_NODE = -2 |
const | POS_FIRST_NODE = -1 |
const | RELATION_CHILD = 1 |
const | RELATION_PARENT = 2 |
const | RELATION_SIBLING = 3 |
const | RELATION_EQUALS = 4 |
const | RELATION_NONE = 5 |
Protected Member Functions | |
getLangCode () | |
fetchTranslationFromObjectDataCache (array $a_obj_ids) | |
Get translation data from object cache (trigger in object cache on preload) More... | |
Protected Attributes | |
const | DEFAULT_LANGUAGE = 'en' |
const | DEFAULT_GAP = 50 |
ilLogger | $logger |
ilDBInterface | $db |
ilAppEventHandler | $eventHandler |
int | $root_id |
points to root node (may be a subtree) More... | |
int | $tree_id |
to use different trees in one db-table More... | |
string | $table_tree |
table name of tree table More... | |
string | $table_obj_data |
table name of object_data table More... | |
string | $table_obj_reference |
table name of object_reference table More... | |
string | $ref_pk |
column name containing primary key in reference table More... | |
string | $obj_pk |
column name containing primary key in object table More... | |
string | $tree_pk |
column name containing tree id in tree table More... | |
bool | $use_cache |
array | $oc_preloaded = [] |
array | $depth_cache = [] |
array | $parent_cache = [] |
array | $in_tree_cache = [] |
array | $translation_cache = [] |
array | $parent_type_cache = [] |
array | $is_saved_cache = [] |
Private Member Functions | |
__renumber (int $node_id=1, int $i=1) | |
This method is private. More... | |
Private Attributes | |
string | $lang_code |
int | $gap |
Size of the gaps to be created in the nested sets sequence numbering of the tree nodes. More... | |
ilTreeImplementation | $tree_impl = null |
array | $path_id_cache = [] |
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.
If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco.
Definition at line 29 of file class.ilTree.php.
ilTree::__construct | ( | int | $a_tree_id, |
int | $a_root_id = 0 , |
||
ilDBInterface | $db = null |
||
) |
InvalidArgumentException |
Definition at line 133 of file class.ilTree.php.
References $DIC, ilLogLevel\ERROR, ilLoggerFactory\getLogger(), initTreeImplementation(), ILIAS\Repository\logger(), and ROOT_FOLDER_ID.
ilTree::__checkDelete | ( | array | $a_node | ) |
Check for deleteTree() compares a subtree of a given node by checking lft, rgt against parent relation.
ilInvalidTreeStructureException |
Definition at line 1948 of file class.ilTree.php.
References $message, $query, $res, __getSubTreeByParentRelation(), __validateSubtrees(), getTreeImplementation(), ILIAS\Repository\int(), and ILIAS\Repository\logger().
Referenced by deleteTree().
ilTree::__getSubTreeByParentRelation | ( | int | $a_node_id, |
array & | $parent_childs | ||
) |
ilInvalidTreeStructureException |
Definition at line 1980 of file class.ilTree.php.
References $message, $query, $res, ILIAS\Repository\int(), and ILIAS\Repository\logger().
Referenced by __checkDelete().
ilTree::__isMainTree | ( | ) |
Check if operations are done on main tree.
Definition at line 1937 of file class.ilTree.php.
Referenced by addTree(), checkForParentType(), deleteTree(), getChilds(), getDepth(), getNodeData(), getParentId(), getPathFull(), getPathId(), getSubTree(), initTreeImplementation(), insertNode(), insertNodeFromTrash(), isCacheUsed(), isInTree(), isSaved(), moveTree(), preloadDeleted(), preloadDepthParent(), removeTree(), and renumber().
|
private |
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)
Definition at line 1787 of file class.ilTree.php.
References $i, $query, $res, ilDBConstants\FETCHMODE_OBJECT, ILIAS\Repository\int(), and isRepositoryTree().
Referenced by renumber().
ilTree::__validateSubtrees | ( | array & | $lft_childs, |
array | $parent_childs | ||
) |
array | $lft_childs | |
array | $parent_childs |
ilInvalidTreeStructureException |
Definition at line 2023 of file class.ilTree.php.
References ILIAS\LTI\ToolProvider\$key, $message, ILIAS\Repository\logger(), and ROOT_FOLDER_ID.
Referenced by __checkDelete().
|
static |
STATIC METHOD Removes a single entry from a tree.
The tree structure is NOT updated!
InvalidArgumentException |
Definition at line 1907 of file class.ilTree.php.
References $DIC, $message, $query, $res, ilLoggerFactory\getLogger(), ilDBInterface\manipulateF(), and ROOT_FOLDER_ID.
Referenced by ilValidator\purgeObjects(), and ilSystemCheckTrash\removeSelectedFromSystem().
ilTree::addTree | ( | int | $a_tree_id, |
int | $a_node_id = -1 |
||
) |
create a new tree to do: ???
Definition at line 1298 of file class.ilTree.php.
References $DIC, $message, $query, $res, __isMainTree(), and ILIAS\Repository\logger().
Referenced by ilWorkspaceTree\createTreeForUser(), and ilSCORMPackageParser\handlerBeginTag().
ilTree::buildJoin | ( | ) |
build join depending on table settings private
Definition at line 385 of file class.ilTree.php.
Referenced by fetchPredecessorNode(), fetchSuccessorNode(), ilSCORMTree\getChilds(), getChilds(), getChildsByType(), getChildsByTypeFilter(), getChildSequenceNumber(), getNodeData(), getPathFull(), getSavedNodeData(), getSavedNodeObjIds(), and getSubTreeFilteredByObjIds().
ilTree::checkForParentType | ( | int | $a_ref_id, |
string | $a_type, | ||
bool | $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');.
Definition at line 1857 of file class.ilTree.php.
References $path, __isMainTree(), getPathFull(), ILIAS\Repository\int(), isCacheUsed(), and isInTree().
Referenced by ilEventParticipants\__read(), ilAppointmentPresentationGUI\addContainerInfo(), ilObjSessionGUI\eventsListObject(), ilStudyProgrammeRepositorySearchGUI\fillAutoCompleteToolbar(), ilRepositorySearchGUI\fillAutoCompleteToolbar(), ilObjFolderGUI\forwardToTimingsView(), ilContainerSortingSettings\getInheritedSettings(), ilLPStatusCollection\getMembers(), ilObjSurvey\getNotificationTargetUserIds(), ilBookingReservationsTableGUI\getParentGroupCourse(), ilObjFolder\getViewMode(), ilObjGroup\getViewMode(), ilObjSessionGUI\initContainer(), ilObjectRolePermissionTableGUI\initFilter(), ilRepositoryExplorer\isVisible(), ilObjectGUI\isVisible(), ilObjSessionGUI\modifyItemGUI(), ilObjFolderGUI\modifyItemGUI(), ilObject\selfOrParentWithRatingEnabled(), ilObjBlogGUI\setSettingsSubTabs(), and ilObjGroup\translateViewMode().
ilTree::checkTree | ( | ) |
check consistence of tree all left & right values are checked if they are exists only once
Definition at line 933 of file class.ilTree.php.
References $message, $query, $res, and ILIAS\Repository\logger().
Referenced by ilObjContentObject\checkTree().
ilTree::checkTreeChilds | ( | bool | $a_no_zero_child = true | ) |
check, if all childs of tree nodes exist in object table
ilInvalidTreeStructureException |
Definition at line 961 of file class.ilTree.php.
References $message, $obj_pk, $query, and ILIAS\Repository\logger().
Referenced by ilObjContentObject\checkTree().
ilTree::deleteNode | ( | int | $a_tree_id, |
int | $a_node_id | ||
) |
ilTree::deleteTree | ( | array | $a_node | ) |
delete node and the whole subtree under this node
Definition at line 767 of file class.ilTree.php.
References __checkDelete(), __isMainTree(), ilLogLevel\ERROR, getTreeImplementation(), ILIAS\Repository\logger(), and resetInTreeCache().
Referenced by ilWorkspaceTree\cascadingDelete(), ilObjContentObjectGUI\confirmedDelete(), ilObjSkillTreeGUI\confirmedDeleteTrees(), ilObjTaxonomy\doDelete(), ilObjContentObject\fixTree(), ilRepUtil\removeObjectsFromSystem(), ilValidator\restoreDeletedObjects(), and ilValidator\restoreSubTrees().
ilTree::fetchNodeData | ( | array | $a_row | ) |
get data of parent node from tree and object_data
Definition at line 1121 of file class.ilTree.php.
References $data, $DIC, ILIAS\LTI\ToolProvider\$key, $lang_code, $lng, $query, $res, ilContainerReference\_lookupTitle(), ilObject\DESC_LENGTH, isCacheUsed(), ROLE_FOLDER_ID, and ilStr\shortenTextExtended().
Referenced by fetchPredecessorNode(), fetchSuccessorNode(), ilSCORMTree\getChilds(), getChilds(), getChildsByType(), getChildsByTypeFilter(), getNodeData(), getParentNodeData(), getPathFull(), getSavedNodeData(), and getSubTree().
ilTree::fetchPredecessorNode | ( | int | $a_node_id, |
string | $a_type = "" |
||
) |
get node data of predecessor node
InvalidArgumentException |
Definition at line 1706 of file class.ilTree.php.
References $message, $query, $res, buildJoin(), fetchNodeData(), and ILIAS\Repository\logger().
ilTree::fetchSuccessorNode | ( | int | $a_node_id, |
string | $a_type = "" |
||
) |
get node data of successor node
InvalidArgumentException |
Definition at line 1654 of file class.ilTree.php.
References $query, $res, buildJoin(), and fetchNodeData().
Referenced by ilObjContentObject\hasSuccessorPage().
|
protected |
Get translation data from object cache (trigger in object cache on preload)
array | $a_obj_ids | object ids |
Definition at line 1198 of file class.ilTree.php.
References $DIC, $id, and isCacheUsed().
Referenced by getChilds().
ilTree::getChildIds | ( | int | $a_node | ) |
int | $a_node |
Definition at line 421 of file class.ilTree.php.
References $query, $res, ilDBConstants\FETCHMODE_OBJECT, and ILIAS\Repository\int().
ilTree::getChilds | ( | int | $a_node_id, |
string | $a_order = "" , |
||
string | $a_direction = "ASC" |
||
) |
get child nodes of given node
Definition at line 440 of file class.ilTree.php.
References $DIC, $ilUser, $query, $res, $rows, __isMainTree(), buildJoin(), fetchNodeData(), fetchTranslationFromObjectDataCache(), ILIAS\Repository\int(), and isCacheUsed().
Referenced by ilContainerGUI\cloneNodes(), ilObject\collectDeletionDependencies(), ilStructureObject\delete_rec(), ilNewsItem\getAggregatedChildNewsData(), getFilteredChilds(), ilContainer\getInitialSubitems(), ilObjWorkspaceFolderTableGUI\getItems(), ilAdminSubItemsTableGUI\getItems(), ilWorkspaceContentGUI\getItems(), ilSkillTree\getMaxOrderNr(), ilClassificationBlockGUI\getSubItemIds(), ilTaggingClassificationProvider\getSubTreeTags(), ilTaxonomyClassificationExplorerGUI\getTreeComponent(), ilObjWorkspaceFolder\gotItems(), ILIAS\Skill\Tree\SkillTreeNodeManager\saveChildsOrder(), ilContainerGUI\showLinkListObject(), and ilContainerXmlWriter\writeSubitems().
ilTree::getChildsByType | ( | int | $a_node_id, |
string | $a_type | ||
) |
get child nodes of given node by object type
Definition at line 538 of file class.ilTree.php.
References $query, $res, buildJoin(), and fetchNodeData().
Referenced by ilEventItems\_getItemsOfContainer(), ilItemGroupItems\_getItemsOfContainer(), ilContainerGUI\cloneNodes(), ilObjGlossary\getAllGlossaryIds(), ilSessionAppointment\lookupLastSessionByCourse(), ilSessionAppointment\lookupNextSessionByCourse(), and ilStructureObjectGUI\putInTree().
ilTree::getChildsByTypeFilter | ( | int | $a_node_id, |
array | $a_types, | ||
string | $a_order = "" , |
||
string | $a_direction = "ASC" |
||
) |
get child nodes of given node by object type
Definition at line 581 of file class.ilTree.php.
References $query, $res, buildJoin(), fetchNodeData(), and ilArrayUtil\quoteArray().
Referenced by ilCheckSumOfWorkspaceFileSizesJob\calculateRecursive(), and ilCollectWorkspaceFilesJob\recurseFolder().
ilTree::getChildSequenceNumber | ( | array | $a_node, |
string | $type = "" |
||
) |
get sequence number of node in sibling sequence
InvalidArgumentException |
Definition at line 1573 of file class.ilTree.php.
References $message, $query, $res, $type, buildJoin(), and ILIAS\Repository\logger().
Referenced by ilStructureObject\_getPresentationTitle().
ilTree::getDepth | ( | int | $a_node_id | ) |
return depth of a node in tree
Definition at line 1045 of file class.ilTree.php.
References $DIC, $query, $res, and __isMainTree().
ilTree::getDepthCache | ( | ) |
ilTree::getFilteredChilds | ( | array | $a_filter, |
int | $a_node, | ||
string | $a_order = "" , |
||
string | $a_direction = "ASC" |
||
) |
get child nodes of given node (exclude filtered obj_types)
string[] | objects to filter (e.g array('rolf')) |
int | 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 517 of file class.ilTree.php.
References getChilds().
ilTree::getFilteredSubTree | ( | int | $a_node_id, |
array | $a_filter = [] |
||
) |
get filtered subtree get all subtree nodes beginning at a specific node excluding specific object types and their child nodes.
E.g getFilteredSubTreeNodes()
Definition at line 706 of file class.ilTree.php.
References getNodeData(), and getSubTree().
ilTree::getGap | ( | ) |
Get default gap.
Definition at line 322 of file class.ilTree.php.
References $gap.
|
protected |
ilTree::getLeftValue | ( | int | $a_node_id | ) |
get left value of given node
InvalidArgumentException |
Definition at line 1547 of file class.ilTree.php.
References $DIC, $message, $query, $res, and ILIAS\Repository\logger().
ilTree::getMaximumDepth | ( | ) |
Return the current maximum depth in the tree.
Definition at line 1031 of file class.ilTree.php.
References $DIC, $query, $res, and $table_tree.
ilTree::getNodeData | ( | int | $a_node_id, |
?int | $a_tree_pk = null |
||
) |
get all information of a node.
get data of a specific node from tree and object_data
InvalidArgumentException |
Definition at line 1094 of file class.ilTree.php.
References $message, $query, $res, $tree_id, $tree_pk, __isMainTree(), buildJoin(), fetchNodeData(), and ILIAS\Repository\logger().
Referenced by ilPersonalSkillExplorerGUI\__construct(), ilCourseObjectiveMaterials\_getAssignableMaterials(), ilCourseObjectiveQuestion\_getAssignableTests(), ilObjSCORMLearningModule\_getTrackingItems(), ilWorkspaceTree\cascadingDelete(), ilObjContentObject\checkStructure(), ilObjContentObjectGUI\confirmedDelete(), ilObjSkillTreeGUI\confirmedDeleteTrees(), ilRepUtil\deleteObjects(), ilRepUtil\deleteObjectType(), ilObjTaxonomy\doDelete(), ilObjSessionGUI\eventsListObject(), ilSessionOverviewGUI\exportCSV(), ilObjContentObject\fixTree(), ilRepositoryExplorer\formatHeader(), ilSessionOverviewTableGUI\gatherEvents(), ilNewsItem\getAggregatedNewsData(), ilObjGlossary\getAllGlossaryIds(), ilStructureObject\getChapterList(), ilGlobalVirtualSkillTree\getChildsOfNode(), ilLMTree\getCompleteTree(), ilPortfolioPageGUI\getCoursesOfUser(), ilObjPortfolioGUI\getCreateInfoMessage(), ilSessionMaterialsTableGUI\getDataFromDb(), ilFavouritesDBRepository\getFavouritesOfUser(), getFilteredSubTree(), ilContainer\getInitialSubitems(), ilPortfolioPageTableGUI\getItems(), ilBadgeUserTableGUI\getItems(), ilWorkspaceTree\getObjectsFromType(), getSubTreeFilteredByObjIds(), ilTaggingClassificationProvider\getSubTreeTags(), ilTaxonomyClassificationExplorerGUI\getTreeComponent(), ilTreeExplorerGUI\getTreeComponent(), ilPCVerificationGUI\getValidWorkspaceCertificateNodeByIdMap(), ilObjPortfolioGUI\initBlogForm(), ilObjPortfolioGUI\initCreateForm(), ilObjPortfolioGUI\initCreatePortfolioFromTemplateForm(), ilPCFileListGUI\initEditForm(), ilTestTaxonomyTree\initOrderedTreeIndex(), ilPCFileListGUI\insertNewFileItem(), ilPCFileItemGUI\insertNewItemAfter(), ilPCFileItemGUI\insertNewItemBefore(), ilContainerGUI\pasteObject(), ilContainerGUI\performPasteIntoMultipleObjectsObject(), ilRepUtil\removeObjectsFromSystem(), ilRepositorySelectorInputGUI\render(), ilValidator\restoreSubTrees(), ilExSubmissionObjectGUI\setSelectedBlogObject(), and ilMDEditorGUI\updateQuickEdit_scorm_propagate().
ilTree::getNodePath | ( | int | $a_endnode_id, |
int | $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:
Definition at line 896 of file class.ilTree.php.
References $data, $i, $query, $res, and getPathId().
ilTree::getNodeTreeData | ( | int | $a_node_id | ) |
return all columns of tabel tree
InvalidArgumentException |
Definition at line 1071 of file class.ilTree.php.
References $DIC, $query, $res, ilLogLevel\ERROR, ilDBConstants\FETCHMODE_ASSOC, and ILIAS\Repository\logger().
Referenced by getRelation(), getSubTreeQuery(), getTrashSubTreeQuery(), and moveToTrash().
ilTree::getObjectDataTable | ( | ) |
Get object data table.
Definition at line 298 of file class.ilTree.php.
References $table_obj_data.
Referenced by getSubTreeFilteredByObjIds().
ilTree::getParentCache | ( | ) |
ilTree::getParentId | ( | int | $a_node_id | ) |
get parent id of given node
InvalidArgumentException |
Definition at line 1515 of file class.ilTree.php.
References $DIC, $query, $res, and __isMainTree().
Referenced by ilOrgUnitExtension\__construct(), ilFileVersionsGUI\__construct(), ilConditionHandler\_getPersistedConditionsOfTrigger(), ilObjItemGroupGUI\_goto(), ilObjPollGUI\_goto(), ilConditionHandler\_isReferenceHandlingOptional(), ilSurveyExecutionGUI\backToRepository(), ilObjSessionGUI\cancelEditObject(), ilPCQuestionGUI\createQuestionPool(), ilSurveyEditorGUI\createQuestionPool(), ilObjTestGUI\createQuestionPool(), ilObjSessionGUI\createRecurringSessions(), ilAdministrationCommandGUI\cut(), ilObjPortfolioBaseGUI\deletePortfolioPages(), ilObjMediaPoolGUI\executeCommand(), ilObjSessionGUI\executeCommand(), ilObjGlossary\getAllGlossaryIds(), ilFavouritesDBRepository\getFavouritesOfUser(), ilRepositorySelectorInputGUI\getHighlightedNode(), ilObjectLP\getLPMemberships(), ilObjSessionGUI\getTabs(), ilObjItemGroupGUI\gotoParent(), ilObjSessionGUI\handleFileUpload(), ilConditionSelector\isNodeVisible(), ilAdministrationCommandGUI\link(), ilObjItemGroupGUI\listMaterials(), ilObjSessionGUI\materialsObject(), moveTree(), ilObjTaxonomyGUI\pasteItems(), ilContainerGUI\pasteObject(), ilContainerGUI\performPasteIntoMultipleObjectsObject(), ilObjSessionGUI\redirectToParentContentPageObject(), ilWorkspaceContentGUI\render(), ilObjBlogGUI\renderFullScreen(), ilRepUtil\restoreObjects(), ilObjMediaPoolGUI\returnFromItem(), ilObjItemGroupGUI\setTabs(), ilObjSessionGUI\showJoinRequestButton(), ilAdministrationCommandGUI\showPasteTree(), and ilObjSessionGUI\unregisterObject().
ilTree::getParentNodeData | ( | int | $a_node_id | ) |
get data of parent node from tree and object_data
Definition at line 1253 of file class.ilTree.php.
References $DIC, $query, $res, and fetchNodeData().
Referenced by ilObjIndividualAssessment\getParentContainerIdByType(), ilObjStudyProgramme\getParentId(), ilContainerGUI\performPasteIntoMultipleObjectsObject(), and ilObjStudyProgramme\setProgressesCompletedIfParentIsProgrammeInLPCompletedMode().
ilTree::getPathFull | ( | 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.
This function chooses the algorithm to be used.
Definition at line 797 of file class.ilTree.php.
References $i, __isMainTree(), buildJoin(), ilDBConstants\FETCHMODE_ASSOC, fetchNodeData(), and getPathId().
Referenced by ilContainerGUI\_buildPath(), ilObjContentObject\_checkPreconditionsOfPage(), ilNewsItem\_getDefaultVisibilityForRefId(), ilObjQuestionPool\_getFullPathToQpl(), ilObjContentObject\_getMissingPreconditionsOfPage(), ilObjContentObject\_getMissingPreconditionsTopChapter(), ilLocatorGUI\addAdministrationItems(), ilLocatorGUI\addContextItems(), ilObjMediaPoolGUI\addLocatorItems(), ilLocatorGUI\addRepositoryItems(), ilSurveySyncTableGUI\buildPath(), ilRepositoryTrashGUI\buildPath(), ilSurveyEvaluationGUI\cancelEvaluationAccess(), checkForParentType(), ilSurveyEvaluationGUI\evaluation(), ilSkillLevelResourcesTableGUI\fillRow(), ilClassificationBlockGUI\filterContainer(), ilFeedWriter\getContextPath(), ilPortfolioPageGUI\getCoursesOfUser(), ilRecommendedContentRoleTableGUI\getItems(), ilObjTaxonomyAdministration\getPath(), ilTestTaxonomyTree\getPathNodes(), ilTaxMDGUI\getSelectableTaxonomies(), ilSkillTree\getSkillTreePath(), and ilObjCategoryGUI\getTaxonomiesForRefId().
ilTree::getPathId | ( | 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 866 of file class.ilTree.php.
References __isMainTree(), ilLogLevel\ERROR, getTreeImplementation(), isCacheUsed(), and ILIAS\Repository\logger().
Referenced by ilSolutionExplorer\__construct(), ilObjStyleSheet\_getStandardStyles(), ilObjectLP\findMembershipsByPath(), ilWorkspaceFolderUserSettings\getEffectiveSortation(), getNodePath(), getPathFull(), ilRepositoryExplorerGUI\getTopNodeForRefId(), ilSkillTree\getTopParentNodeId(), ilObjectLP\handleMove(), and ilSkillNotifications\sendMail().
ilTree::getRbacSubtreeInfo | ( | int | $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.
Definition at line 2084 of file class.ilTree.php.
References getTreeImplementation().
ilTree::getRelation | ( | int | $a_node_a, |
int | $a_node_b | ||
) |
Get relation of two nodes.
Definition at line 401 of file class.ilTree.php.
References getNodeTreeData(), and getRelationOfNodes().
Referenced by isGrandChild().
ilTree::getRelationOfNodes | ( | array | $a_node_a_arr, |
array | $a_node_b_arr | ||
) |
get relation of two nodes by node data
Definition at line 412 of file class.ilTree.php.
References getTreeImplementation().
Referenced by getRelation().
ilTree::getRootId | ( | ) |
Definition at line 1628 of file class.ilTree.php.
References $root_id.
Referenced by ilObjMediaPoolGUI\addLocatorItems(), ilObjContentObject\checkStructure(), ilObjPortfolioBase\createBlogInPersonalWorkspace(), ilObjMediaPool\createFolder(), ilObjContentObject\fixTree(), ilWorkspaceTree\getObjectsFromType(), ilPCVerificationGUI\getValidWorkspaceCertificateNodeByIdMap(), ilTestTaxonomyTree\initOrderedTreeIndex(), ilStructureObjectGUI\putInTree(), ilLMObject\putInTree(), ilObjPortfolioGUI\saveBlog(), and ilMDEditorGUI\updateQuickEdit_scorm_propagate().
ilTree::getSavedNodeData | ( | int | $a_parent_id | ) |
get data saved/deleted nodes
InvalidArgumentException |
Definition at line 1464 of file class.ilTree.php.
References $DIC, $message, $query, $res, buildJoin(), fetchNodeData(), and ILIAS\Repository\logger().
Referenced by ilRepositoryTrashGUI\showTrashTable().
ilTree::getSavedNodeObjIds | ( | array | $a_obj_ids | ) |
get object id of saved/deleted nodes
Definition at line 1494 of file class.ilTree.php.
References $DIC, $query, $res, buildJoin(), and ILIAS\Repository\int().
ilTree::getSubTree | ( | array | $a_node, |
bool | $a_with_data = true , |
||
array | $a_type = [] |
||
) |
get all nodes in the subtree under specified node
remove the in cache exception for lm tree
refactor $a_type to string[]
Definition at line 744 of file class.ilTree.php.
References $query, $res, __isMainTree(), fetchNodeData(), getTreeImplementation(), and ILIAS\Repository\int().
Referenced by ilPersonalSkillExplorerGUI\__construct(), ilCourseObjectiveMaterials\_getAssignableMaterials(), ilCourseObjectiveQuestion\_getAssignableTests(), ilObjSCORMLearningModule\_getTrackingItems(), ilWorkspaceTree\cascadingDelete(), ilObjContentObject\checkStructure(), ilRepUtil\deleteObjects(), ilRepUtil\deleteObjectType(), ilObjSessionGUI\eventsListObject(), ilObjContentObject\fixTree(), ilNewsItem\getAggregatedNewsData(), ilObjGlossary\getAllGlossaryIds(), ilStructureObject\getChapterList(), ilLMTree\getCompleteTree(), ilObjPortfolioGUI\getCreateInfoMessage(), ilSessionMaterialsTableGUI\getDataFromDb(), getFilteredSubTree(), ilContainer\getInitialSubitems(), ilBadgeUserTableGUI\getItems(), ilWorkspaceTree\getObjectsFromType(), ilTaggingClassificationProvider\getSubTreeTags(), ilObjPortfolioGUI\initBlogForm(), ilObjPortfolioGUI\initCreateForm(), ilObjPortfolioGUI\initCreatePortfolioFromTemplateForm(), ilTestTaxonomyTree\initOrderedTreeIndex(), ilContainerGUI\performPasteIntoMultipleObjectsObject(), ilRepUtil\removeObjectsFromSystem(), ilValidator\restoreSubTrees(), and ilMDEditorGUI\updateQuickEdit_scorm_propagate().
ilTree::getSubTreeFilteredByObjIds | ( | int | $a_node_id, |
array | $a_obj_ids, | ||
array | $a_fields = [] |
||
) |
get all node ids in the subtree under specified node id, filter by object ids
int[] | $a_obj_ids |
string[] | $a_fields |
Definition at line 2126 of file class.ilTree.php.
References $query, $res, buildJoin(), getNodeData(), getObjectDataTable(), getTableReference(), getTreeImplementation(), and getTreeTable().
Referenced by ilClassificationBlockGUI\filterContainer(), and ilClassificationBlockGUI\getSubItemIds().
ilTree::getSubTreeIds | ( | int | $a_ref_id | ) |
Get all ids of subnodes.
int | $a_ref_id |
Definition at line 734 of file class.ilTree.php.
References getTreeImplementation().
Referenced by ilObjTaxonomy\doDelete(), ilObjTaxonomy\getSubTreeItems(), and ilObjectLP\handleMove().
ilTree::getSubTreeQuery | ( | int | $a_node_id, |
array | $a_fields = [] , |
||
array | $a_types = [] , |
||
bool | $a_force_join_reference = false |
||
) |
Get tree subtree query.
Definition at line 2092 of file class.ilTree.php.
References getNodeTreeData(), and getTreeImplementation().
ilTree::getTableReference | ( | ) |
Get reference table if available.
Definition at line 314 of file class.ilTree.php.
References $table_obj_reference.
Referenced by getSubTreeFilteredByObjIds().
ilTree::getTrashSubTreeQuery | ( | int | $a_node_id, |
array | $a_fields = [] , |
||
array | $a_types = [] , |
||
bool | $a_force_join_reference = false |
||
) |
Definition at line 2106 of file class.ilTree.php.
References getNodeTreeData(), and getTreeImplementation().
ilTree::getTreeId | ( | ) |
Definition at line 1638 of file class.ilTree.php.
References $tree_id.
Referenced by ilObjSkillTreeGUI\confirmedDeleteTrees(), ilWorkspaceTree\exists(), ilSkillTree\getChildsByTypeFilter(), and ilSkillTree\initChildsData().
ilTree::getTreeImplementation | ( | ) |
Get tree implementation.
Definition at line 227 of file class.ilTree.php.
References $tree_impl.
Referenced by __checkDelete(), deleteTree(), getPathId(), getRbacSubtreeInfo(), getRelationOfNodes(), getSubTree(), getSubTreeFilteredByObjIds(), getSubTreeIds(), getSubTreeQuery(), getTrashSubTreeQuery(), insertNode(), moveToTrash(), moveTree(), and validateParentRelations().
ilTree::getTreePk | ( | ) |
Get tree primary key.
Definition at line 306 of file class.ilTree.php.
References $tree_pk.
ilTree::getTreeTable | ( | ) |
Get tree table name.
Definition at line 290 of file class.ilTree.php.
References $table_tree.
Referenced by getSubTreeFilteredByObjIds().
ilTree::initLangCode | ( | ) |
Do not use it Store user language.
This function is used by the "main" tree only (during initialisation).
Definition at line 275 of file class.ilTree.php.
References $DIC.
ilTree::initTreeImplementation | ( | ) |
Init tree implementation.
Definition at line 202 of file class.ilTree.php.
References $DIC, and __isMainTree().
Referenced by __construct(), and setTableNames().
ilTree::insertNode | ( | int | $a_node_id, |
int | $a_parent_id, | ||
int | $a_pos = self::POS_LAST_NODE , |
||
bool | $a_reset_deletion_date = false |
||
) |
insert new node with node_id under parent node with parent_id
InvalidArgumentException |
Definition at line 656 of file class.ilTree.php.
References $message, __isMainTree(), ilObject\_resetDeletedDate(), ilLogLevel\ERROR, getTreeImplementation(), isInTree(), and ILIAS\Repository\logger().
Referenced by ilObjMediaPoolGUI\createMediaFromUploadDir(), ilObjMediaPoolGUI\executeCommand(), ilObjMediaPoolGUI\handleUploadResult(), insertNodeFromTrash(), ilWorkspaceTree\insertObject(), and ilObjFolder\putInTree().
ilTree::insertNodeFromTrash | ( | int | $a_source_id, |
int | $a_target_id, | ||
int | $a_tree_id, | ||
int | $a_pos = self::POS_LAST_NODE , |
||
bool | $a_reset_deleted_date = false |
||
) |
Insert node from trash deletes trash entry.
If we have database query exceptions we could wrap insertNode in try/catch and rollback if the insert failed.
Definition at line 625 of file class.ilTree.php.
References $query, __isMainTree(), ilLoggerFactory\getLogger(), insertNode(), isInTree(), ILIAS\Repository\logger(), and ilLogLevel\WARNING.
Referenced by ilRepUtil\insertSavedNodes().
ilTree::isCacheUsed | ( | ) |
Check if cache is active.
Definition at line 243 of file class.ilTree.php.
References $use_cache, and __isMainTree().
Referenced by checkForParentType(), fetchNodeData(), fetchTranslationFromObjectDataCache(), getChilds(), getPathId(), isInTree(), isSaved(), preloadDeleted(), and preloadDepthParent().
ilTree::isDeleted | ( | int | $a_node_id | ) |
This is a wrapper for isSaved() with a more useful name.
Definition at line 1400 of file class.ilTree.php.
References isSaved().
Referenced by ilEventItems\__read(), ilConditionHandler\_checkAllConditionsOfTarget(), ilObjCourseGrouping\_checkGroupingDependencies(), ilObjCourseGrouping\_getGroupingCourseIds(), ilObjCourseGrouping\_getGroupingItems(), ilInfoScreenGUI\addPreconditionSection(), ilRepUtil\deleteObjects(), ilClassificationBlockGUI\filterContainer(), ilObjCourse\findCoursesWithNotEnoughMembers(), ilObjGroup\findGroupsWithNotEnoughMembers(), ilMembershipNotifications\getActiveUsersforAllObjects(), ilPortfolioPageGUI\getCoursesOfUser(), ilObjCategoryReferenceListGUI\getProperties(), ilObjStudyProgramme\getReferencesTo(), ilObjTaxonomyAdministration\getRepositoryTaxonomies(), ilTaggingClassificationProvider\getSubTreeTags(), ilRepositoryTrashGUI\handleMultiReferences(), ilObjCategoryReferenceListGUI\initItem(), and ilObjGroupReferenceListGUI\initItem().
ilTree::isGrandChild | ( | int | $a_startnode_id, |
int | $a_querynode_id | ||
) |
checks if a node is in the path of an other node
Definition at line 1289 of file class.ilTree.php.
References getRelation().
Referenced by ilObjectLP\findMembershipsByPath(), ilObjectLP\handleMove(), ilPageObject\handleRepositoryLinksOnCopy(), ilObjTaxonomyGUI\pasteItems(), and ilContainerGUI\performPasteIntoMultipleObjectsObject().
ilTree::isInTree | ( | ?int | $a_node_id | ) |
get all information of a node.
get data of a specific node from tree and object_data
Definition at line 1218 of file class.ilTree.php.
References $query, $res, __isMainTree(), and isCacheUsed().
Referenced by ilEventItems\__read(), ilObjContentObject\_checkPreconditionsOfPage(), ilNewsItem\_getDefaultVisibilityForRefId(), ilObjContentObject\_getMissingPreconditionsOfPage(), ilObjContentObject\_getMissingPreconditionsTopChapter(), ilStructureObject\_getPresentationTitle(), ilObjStyleSheet\_getStandardStyles(), ilInfoScreenGUI\addMetaDataSections(), checkForParentType(), ilObjContentObject\checkStructure(), ilObjContentObjectGUI\confirmedDelete(), ilObjSkillTreeGUI\confirmedDeleteTrees(), ilObjContentObject\fixTree(), ilFavouritesDBRepository\getFavouritesOfUser(), ilMediaPoolPageUsagesTableGUI\getItems(), ilMediaObjectUsagesTableGUI\getItems(), ilNavigationHistory\getItems(), ilObjStudyProgramme\getParentId(), ilObjContentObject\hasSuccessorPage(), ilInternalLinkGUI\init(), insertNode(), insertNodeFromTrash(), ilContainerStartObjects\read(), ilSkillResources\readResources(), and ilSkillNotifications\sendMail().
ilTree::isRepositoryTree | ( | ) |
check if current tree instance operates on repository tree table
Definition at line 2197 of file class.ilTree.php.
Referenced by __renumber().
ilTree::isSaved | ( | int | $a_node_id | ) |
Use method isDeleted.
Definition at line 1409 of file class.ilTree.php.
References $query, $res, $tree_pk, __isMainTree(), and isCacheUsed().
Referenced by ilBlogExercise\getAssignmentsOfBlog(), ilPortfolioExercise\getAssignmentsOfPortfolio(), and isDeleted().
ilTree::lookupTrashedObjectTypes | ( | ) |
Lookup object types in trash.
Definition at line 2177 of file class.ilTree.php.
References $query, $res, and ilDBConstants\FETCHMODE_OBJECT.
|
static |
int | $node_id |
Definition at line 182 of file class.ilTree.php.
References $DIC, $query, $res, ilDBConstants\FETCHMODE_OBJECT, ILIAS\Repository\int(), ilDBInterface\query(), ilDBInterface\quote(), and ilDBConstants\T_INTEGER.
Referenced by ilRepUtil\removeObjectsFromSystem(), and ilRepUtil\restoreObjects().
ilTree::moveToTrash | ( | int | $a_node_id, |
bool | $a_set_deleted = false , |
||
int | $a_deleted_by = 0 |
||
) |
Move node to trash bin.
InvalidArgumentException |
Definition at line 1362 of file class.ilTree.php.
References $DIC, $query, $res, ilLogLevel\ERROR, ilDBConstants\FETCHMODE_ASSOC, getNodeTreeData(), getTreeImplementation(), ILIAS\Repository\int(), ILIAS\Repository\logger(), and ilObject\setDeletedDates().
Referenced by ilRepUtil\deleteObjects().
ilTree::moveTree | ( | int | $a_source_id, |
int | $a_target_id, | ||
int | $a_location = self::POS_LAST_NODE |
||
) |
Move Tree Implementation public.
int | source ref_id |
int | target ref_id |
int | location ilTree::POS_LAST_NODE or ilTree::POS_FIRST_NODE |
Definition at line 2061 of file class.ilTree.php.
References $GLOBALS, __isMainTree(), getParentId(), and getTreeImplementation().
Referenced by ilObjTaxonomyGUI\pasteItems(), and ilContainerGUI\performPasteIntoMultipleObjectsObject().
ilTree::preloadDeleted | ( | array | $a_node_ids | ) |
Preload deleted information.
Definition at line 1437 of file class.ilTree.php.
References $query, $res, __isMainTree(), and isCacheUsed().
ilTree::preloadDepthParent | ( | array | $a_node_ids | ) |
Preload depth/parent.
int[] |
Definition at line 843 of file class.ilTree.php.
References $DIC, $res, __isMainTree(), ILIAS\Repository\int(), and isCacheUsed().
ilTree::readRootId | ( | ) |
Definition at line 1612 of file class.ilTree.php.
References $query, $res, $root_id, and ILIAS\Repository\int().
Referenced by ilWorkspaceTree\__construct(), ilSCORMExplorer\__construct(), ilLMTree\__construct(), ilContainerSelectionExplorer\__construct(), ilTaxonomyTableGUI\__construct(), ilTestTaxonomyTree\__construct(), ilLMExplorerGUI\__construct(), ilSolutionExplorer\__construct(), ilObjContentObject\_checkPreconditionsOfPage(), ilObjContentObject\_getMissingPreconditionsOfPage(), ilObjContentObject\_getMissingPreconditionsTopChapter(), ilObjSCORMLearningModule\_getTrackingItems(), ilObjMediaPoolGUI\afterConstructor(), ilObjQuestionPoolGUI\buildQuestionBrowserTableGUI(), ilWorkspaceTree\cascadingDelete(), ilWorkspaceAccessHandler\checkAccessOfUser(), ilObjTaxonomy\doDelete(), ilSCORMPresentationGUI\explorer(), ilStructureObject\getChapterList(), ilGlobalVirtualSkillTree\getChildsOfNode(), ilLMTree\getCompleteTree(), ilObjPortfolioGUI\getCreateInfoMessage(), ilPortfolioPageTableGUI\getItems(), ilSkillTree\getMaxOrderNr(), ilTaxonomyClassificationExplorerGUI\getTreeComponent(), ilTreeExplorerGUI\getTreeComponent(), ilObjPortfolioGUI\initBlogForm(), ilObjPortfolioGUI\initCreateForm(), ilObjPortfolioGUI\initCreatePortfolioFromTemplateForm(), ilObjTaxonomyGUI\listNodes(), ilObjTaxonomyGUI\pasteItems(), ilObjPortfolioGUI\saveBlog(), ilContentStyleSettingsGUI\saveScope(), ilGroupAddToGroupActionGUI\selectGroup(), ilGroupAddToGroupActionGUI\selectParent(), ilObjContentObjectGUI\showLMGlossarySelector(), and ilObjWorkspaceFolderGUI\showMoveIntoObjectTree().
ilTree::removeTree | ( | int | $a_tree_id | ) |
remove an existing tree
Definition at line 1340 of file class.ilTree.php.
References $query, __isMainTree(), ilLogLevel\ERROR, and ILIAS\Repository\logger().
ilTree::renumber | ( | int | $node_id = 1 , |
int | $i = 1 |
||
) |
Wrapper for renumber.
This method locks the table tree (recursive)
Definition at line 1763 of file class.ilTree.php.
References $db, $i, __isMainTree(), and __renumber().
Referenced by ilObjContentObject\fixTree(), and ilValidator\initGapsInTree().
ilTree::resetInTreeCache | ( | ) |
reset in tree cache
Definition at line 330 of file class.ilTree.php.
Referenced by deleteTree().
ilTree::setObjectTablePK | ( | string | $a_column_name | ) |
set column containing primary key in object table
Definition at line 367 of file class.ilTree.php.
Referenced by ilECSCmsTree\__construct(), and ilWorkspaceTree\__construct().
ilTree::setReferenceTablePK | ( | string | $a_column_name | ) |
set column containing primary key in reference table
Definition at line 359 of file class.ilTree.php.
Referenced by ilWorkspaceTree\__construct().
ilTree::setRootId | ( | int | $a_root_id | ) |
Definition at line 1633 of file class.ilTree.php.
Referenced by ilWorkspaceTree\createTreeForUser().
ilTree::setTableNames | ( | string | $a_table_tree, |
string | $a_table_obj_data, | ||
string | $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!
Definition at line 343 of file class.ilTree.php.
References initTreeImplementation().
Referenced by ilTaxonomyTree\__construct(), ilECSCmsTree\__construct(), ilWorkspaceTree\__construct(), ilLMTree\__construct(), ilSCORM2004Tree\__construct(), ilSkillTree\__construct(), ilSCORMTree\__construct(), ilObjContentObject\_checkPreconditionsOfPage(), ilObjContentObject\_getMissingPreconditionsOfPage(), ilObjContentObject\_getMissingPreconditionsTopChapter(), ilObjMediaPool\_getPoolTree(), ilObjContentObject\hasSuccessorPage(), ilStructureObjectGUI\putInTree(), and ilMDEditorGUI\updateQuickEdit_scorm_propagate().
ilTree::setTreeId | ( | int | $a_tree_id | ) |
Definition at line 1643 of file class.ilTree.php.
ilTree::setTreeTablePK | ( | string | $a_column_name | ) |
set column containing primary key in tree table
Definition at line 375 of file class.ilTree.php.
Referenced by ilTaxonomyTree\__construct(), ilWorkspaceTree\__construct(), ilLMTree\__construct(), ilSCORM2004Tree\__construct(), ilSkillTree\__construct(), ilSCORMTree\__construct(), ilObjContentObject\_checkPreconditionsOfPage(), ilObjContentObject\_getMissingPreconditionsOfPage(), ilObjContentObject\_getMissingPreconditionsTopChapter(), ilObjMediaPool\_getPoolTree(), ilObjContentObject\hasSuccessorPage(), ilStructureObjectGUI\putInTree(), and ilMDEditorGUI\updateQuickEdit_scorm_propagate().
ilTree::useCache | ( | bool | $a_use = true | ) |
Use Cache (usually activated)
Definition at line 235 of file class.ilTree.php.
Referenced by ilECSCmsTree\__construct(), ilLMTree\__construct(), and ilRepUtil\deleteObjects().
ilTree::validateParentRelations | ( | ) |
Validate parent relations of tree.
Definition at line 787 of file class.ilTree.php.
References getTreeImplementation().
|
protected |
Definition at line 47 of file class.ilTree.php.
Referenced by ilWorkspaceTree\createReference(), ilWorkspaceTree\deleteReference(), ilWorkspaceTree\exists(), ilLMTree\getLastActivePage(), ilSkillTree\initChildsData(), ilWorkspaceTree\lookupNodeId(), ilWorkspaceTree\lookupObjectId(), ilWorkspaceTree\lookupOwner(), and renumber().
|
protected |
Definition at line 119 of file class.ilTree.php.
Referenced by getDepthCache().
|
protected |
Definition at line 48 of file class.ilTree.php.
|
private |
Size of the gaps to be created in the nested sets sequence numbering of the tree nodes.
Having gaps in the tree greatly improves performance on all operations that add or remove tree nodes. Setting this to zero will leave no gaps in the tree. Setting this to a value larger than zero will create gaps in the tree. Each gap leaves room in the sequence numbering for the specified number of nodes. (The gap is expressed as the number of nodes. Since each node consumes two sequence numbers, specifying a gap of 1 will leave space for 2 sequence numbers.) A gap is created, when a new child is added to a node, and when not enough room between node.rgt and the child with the highest node.rgt value of the node is available. A gap is closed, when a node is removed and when (node.rgt - node.lft) is bigger than gap * 2.
Definition at line 114 of file class.ilTree.php.
Referenced by getGap().
|
protected |
Definition at line 121 of file class.ilTree.php.
|
protected |
Definition at line 124 of file class.ilTree.php.
|
private |
Definition at line 54 of file class.ilTree.php.
Referenced by fetchNodeData(), and getLangCode().
|
protected |
Definition at line 46 of file class.ilTree.php.
|
protected |
column name containing primary key in object table
Definition at line 89 of file class.ilTree.php.
Referenced by checkTreeChilds(), and ilWorkspaceTree\lookupObjectId().
|
protected |
Definition at line 118 of file class.ilTree.php.
|
protected |
Definition at line 120 of file class.ilTree.php.
Referenced by getParentCache().
|
protected |
Definition at line 123 of file class.ilTree.php.
|
private |
Definition at line 128 of file class.ilTree.php.
|
protected |
column name containing primary key in reference table
Definition at line 84 of file class.ilTree.php.
Referenced by ilWorkspaceTree\lookupNodeId().
|
protected |
points to root node (may be a subtree)
Definition at line 59 of file class.ilTree.php.
Referenced by ilWorkspaceTree\cascadingDelete(), ilWorkspaceTree\createTreeForUser(), getRootId(), and readRootId().
|
protected |
table name of object_data table
Definition at line 74 of file class.ilTree.php.
Referenced by getObjectDataTable().
|
protected |
table name of object_reference table
Definition at line 79 of file class.ilTree.php.
Referenced by getTableReference().
|
protected |
table name of tree table
Definition at line 69 of file class.ilTree.php.
Referenced by getMaximumDepth(), and getTreeTable().
|
protected |
Definition at line 122 of file class.ilTree.php.
|
protected |
to use different trees in one db-table
Definition at line 64 of file class.ilTree.php.
Referenced by getNodeData(), and getTreeId().
|
private |
Definition at line 126 of file class.ilTree.php.
Referenced by getTreeImplementation().
|
protected |
column name containing tree id in tree table
Definition at line 94 of file class.ilTree.php.
Referenced by getNodeData(), getTreePk(), and isSaved().
|
protected |
Definition at line 116 of file class.ilTree.php.
Referenced by ilLMTree\isCacheUsed(), and isCacheUsed().
|
protected |
Definition at line 44 of file class.ilTree.php.
|
protected |
Definition at line 43 of file class.ilTree.php.
const ilTree::POS_FIRST_NODE = -1 |
Definition at line 35 of file class.ilTree.php.
Referenced by ilObjSkillManagementGUI\confirmedDelete(), ilObjSkillTreeGUI\confirmedDelete(), ilObjContentObjectGUI\confirmedDelete(), ilObjSkillTreeGUI\confirmedDeleteTrees(), ilObjContentObjectGUI\delete(), ilObjSkillManagementGUI\deleteNodes(), ilObjSkillTreeGUI\deleteNodes(), ilObjContentObject\executeDragDrop(), ilStructureObjectGUI\insertChapter(), ilObjContentObjectGUI\insertChapter(), ilStructureObjectGUI\insertChapterClip(), ilObjContentObjectGUI\insertChapterClip(), ilNestedSetTree\insertNode(), ilStructureObjectGUI\insertPage(), ilStructureObjectGUI\insertPageClip(), ilLMPageObject\insertPagesFromTemplate(), ilObjContentObjectGUI\moveChapter(), ILIAS\Skill\Tree\SkillTreeNodeManager\putIntoTree(), ilLMObjectGUI\putInTree(), ilTaxonomyNode\putInTree(), ilStructureObjectGUI\putInTree(), ilLMObject\putInTree(), ilObjContentObject\removeAutoGlossary(), and ilStructureObjectGUI\subchap().
const ilTree::POS_LAST_NODE = -2 |
Definition at line 34 of file class.ilTree.php.
Referenced by ilLMObject\clipboardCopy(), ilObjContentObject\copyAllPagesAndChapters(), ilLearningModuleDataSet\importRecord(), ILIAS\Skill\Tree\SkillTreeNodeManager\insertItemsFromClip(), ilNestedSetTree\insertNode(), ilRepUtil\insertSavedNodes(), ILIAS\Skill\Tree\SkillTreeNodeManager\pasteTree(), ilStructureObjectGUI\putInTree(), ilBasicSkillGUI\saveItem(), ilSkillCategoryGUI\saveItem(), ilBasicSkillTemplateGUI\saveItem(), ilSkillTemplateReferenceGUI\saveItem(), and ilSkillTemplateCategoryGUI\saveItem().
const ilTree::RELATION_CHILD = 1 |
Definition at line 37 of file class.ilTree.php.
Referenced by ilObjRole\adjustPermissions(), ilSoapUtils\findMappedReferenceForNode(), ilMaterializedPathTree\getRelation(), and ilNestedSetTree\getRelation().
const ilTree::RELATION_EQUALS = 4 |
Definition at line 40 of file class.ilTree.php.
Referenced by ilObjRole\adjustPermissions(), ilMaterializedPathTree\getRelation(), and ilNestedSetTree\getRelation().
const ilTree::RELATION_NONE = 5 |
Definition at line 41 of file class.ilTree.php.
Referenced by ilObjRole\adjustPermissions(), ilMaterializedPathTree\getRelation(), and ilNestedSetTree\getRelation().
const ilTree::RELATION_PARENT = 2 |
Definition at line 38 of file class.ilTree.php.
Referenced by ilObjRole\adjustPermissions(), ilMaterializedPathTree\getRelation(), ilNestedSetTree\getRelation(), and ilAdvancedMDRecord\isFilteredByScope().
const ilTree::RELATION_SIBLING = 3 |
Definition at line 39 of file class.ilTree.php.
Referenced by ilObjRole\adjustPermissions(), ilMaterializedPathTree\getRelation(), and ilNestedSetTree\getRelation().
const ilTree::TREE_TYPE_MATERIALIZED_PATH = 'mp' |
Definition at line 31 of file class.ilTree.php.
const ilTree::TREE_TYPE_NESTED_SET = 'ns' |
Definition at line 32 of file class.ilTree.php.