5include_once
"Services/Tree/classes/class.ilTree.php";
24 $this->db =
$DIC->database();
25 parent::__construct($a_tree_id, $a_root_id);
27 $this->
setTableNames(
'tree_workspace',
'object_data',
'object_reference_ws');
48 $next_id =
$ilDB->nextId($this->table_obj_reference);
50 $fields = array($this->ref_pk => array(
"integer", $next_id),
51 $this->obj_pk => array(
"integer", $a_object_id));
53 $ilDB->insert($this->table_obj_reference, $fields);
68 $set =
$ilDB->query(
"SELECT " . $this->obj_pk .
69 " FROM " . $this->table_obj_reference .
70 " WHERE " . $this->ref_pk .
" = " .
$ilDB->quote($a_node_id,
"integer"));
89 $set =
$ilDB->query(
"SELECT " . $this->ref_pk .
90 " FROM " . $this->table_obj_reference .
91 " WHERE " . $this->obj_pk .
" = " .
$ilDB->quote($a_obj_id,
"integer"));
107 $set =
$ilDB->query(
"SELECT tree" .
108 " FROM " . $this->table_obj_reference .
109 " JOIN " . $this->table_tree .
" ON (" . $this->table_obj_reference .
"." . $this->ref_pk .
" = " . $this->table_tree .
".child)" .
110 " WHERE " . $this->ref_pk .
" = " .
$ilDB->quote($a_node_id,
"integer"));
126 $this->
insertNode($node_id, $a_parent_node_id);
140 $query =
"DELETE FROM " . $this->table_obj_reference .
141 " WHERE " . $this->ref_pk .
" = " .
$ilDB->quote($a_node_id,
"integer");
157 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
162 foreach ($nodes as $node) {
163 $access_handler->removePermission($node[
"wsp_id"]);
200 $root =
new $root(
null);
An exception for terminatinating execution or to throw for unit testing.
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static getClassByType($a_obj_type)
Get class by type.
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
getSubTree($a_node, $a_with_data=true, $a_type="")
get all nodes in the subtree under specified node
setObjectTablePK($a_column_name)
set column containing primary key in object table @access public
setReferenceTablePK($a_column_name)
set column containing primary key in reference table @access public
deleteTree($a_node)
delete node and the whole subtree under this node @access public
setTreeTablePK($a_column_name)
set column containing primary key in tree table @access public
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...
readRootId()
read root id from database
getNodeData($a_node_id, $a_tree_pk=null)
get all information of a node.
getRootId()
get the root id of tree @access 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 @access public
addTree($a_tree_id, $a_node_id=-1)
create a new tree to do: ???
Access handler for personal workspace.
Tree handler for personal workspace.
lookupNodeId($a_obj_id)
Get node id for object id.
insertObject($a_parent_node_id, $a_object_id)
Add object to tree.
cascadingDelete()
Remove all tree and node data.
deleteReference($a_node_id)
Delete object from reference table.
lookupObjectId($a_node_id)
Get object id for node id.
getObjectsFromType($a_type, $a_with_data=false)
Get all workspace objects of specific type.
__construct($a_tree_id, $a_root_id=0)
Constructor @access public.
lookupOwner($a_node_id)
Get owner for node id.
createReference($a_object_id)
Create workspace reference for object.
createTreeForUser($a_user_id)
Create personal workspace tree for user.
foreach($_POST as $key=> $value) $res