29         bool $read_root_id = 
true    43         if (isset(self::$instances[$a_tree_id])) {
    44             return self::$instances[$a_tree_id];
    47         self::$instances[$a_tree_id] = $tree;
    61         $ilDB->setLimit(1, 0);
    63         $sql = 
"SELECT lm_data.obj_id" .
    65             " JOIN lm_tree ON (lm_tree.child = lm_data.obj_id)" .
    66             " JOIN page_object ON (page_object.page_id = lm_data.obj_id AND page_object.parent_type = " . 
$ilDB->quote(
"lm", 
"text") . 
")" .
    67             " WHERE lm_tree.lm_id = " . 
$ilDB->quote($this->tree_id, 
"integer") .
    68             " AND lm_data.type = " . 
$ilDB->quote(
"pg", 
"text") .
    69             " AND page_object.active = " . 
$ilDB->quote(1, 
"integer") .
    70             " ORDER BY lm_tree.rgt DESC";
    71         $set = 
$ilDB->query($sql);
    72         $row = 
$ilDB->fetchAssoc($set);
    73         return (
int) ($row[
"obj_id"] ?? 0);
    81         if (is_null($this->complete_tree)) {
 
getNodeData(int $a_node_id, ?int $a_tree_pk=null)
get all information of a node. 
 
useCache(bool $a_use=true)
Use Cache (usually activated) 
 
setTreeTablePK(string $a_column_name)
set column containing primary key in tree table 
 
static getInstance(int $a_tree_id)
 
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...
 
__construct(int $a_tree_id, bool $read_root_id=true)
 
getCompleteTree()
Get complete tree. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
getSubTree(array $a_node, bool $a_with_data=true, array $a_type=[])
get all nodes in the subtree under specified node