4 include_once
'./Services/Tree/classes/class.ilTree.php';
16 parent::__construct($a_tree_id, self::lookupRootId($a_tree_id));
27 $query =
'INSERT INTO ecs_cms_tree ' .
28 '(tree,child,parent,lft,rgt,depth) ' .
30 $ilDB->quote($tree,
'integer') .
', ' .
31 $ilDB->quote($a_child,
'integer') .
', ' .
32 $ilDB->quote(0,
'integer') .
', ' .
33 $ilDB->quote(1,
'integer') .
', ' .
34 $ilDB->quote(100,
'integer') .
', ' .
35 $ilDB->quote(1,
'integer') .
' )';
50 $GLOBALS[
'DIC']->logger()->wsrv()->debug(
'Deleting cms tree: ' . $a_tree_id);
51 $query =
'DELETE FROM ecs_cms_tree ' .
52 'WHERE tree = ' . $ilDB->quote($a_tree_id,
'integer');
65 $query =
'SELECT COUNT(*) num FROM ecs_cms_tree WHERE tree = ' . $ilDB->quote($a_tree_id,
'integer');
68 return $row->num > 0 ? true :
false;
81 $query =
'SELECT child FROM ecs_cms_tree WHERE tree = ' . $ilDB->quote($a_tree_id,
'integer');
insertRootNode($tree, $a_child)
static lookupRootId($a_tree_id)
lookup root id
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
setObjectTablePK($a_column_name)
set column containing primary key in object table public
foreach($_POST as $key=> $value) $res
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...
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
treeExists($a_tree_id)
Check if tree exists.
static deleteByTreeId($a_tree_id)
Delete tree by tree_id.
useCache($a_use=true)
Use Cache (usually activated)