31 $lng->loadLanguageModule(
"wsp");
35 $ilCtrl->saveParameter($this,
"wsp_id");
37 $this->node_id = (int) $_REQUEST[
"wsp_id"];
40 $this->node_id = $this->tree->getRootId();
51 $ilCtrl->setReturn($this,
"render");
55 if($_REQUEST[
"new_type"])
57 $class_name = $objDefinition->getClassName($_REQUEST[
"new_type"]);
65 if (strtolower(
$ilCtrl->getNextClass($this)) != strtolower(
"ilObj".$class_name.
"GUI"))
67 $ilCtrl->setCmdClass(
"ilObj".$class_name.
"GUI");
72 $next_class =
$ilCtrl->getNextClass();
75 $node = $this->tree->getNodeData($this->node_id);
76 $next_class =
"ilObj".$objDefinition->getClassName($node[
"type"]).
"GUI";
77 $ilCtrl->setCmdClass($next_class);
84 $class_path =
$ilCtrl->lookupClassPath($next_class);
85 include_once($class_path);
86 $class_name =
$ilCtrl->getClassForClasspath($class_path);
87 if($_REQUEST[
"new_type"])
90 $gui->setCreationMode();
115 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
117 if(!$this->tree->getRootId())
119 $this->tree->createTreeForUser($user_id);
127 $root = $this->tree->getNodeData($this->node_id);
128 if($root[
"type"] !=
"wfld" && $root[
"type"] !=
"wsrt")
131 if(!$ilTabs->back_target)
133 $owner = $this->tree->lookupOwner($this->node_id);
137 $parent = $this->tree->getParentNodeData($this->node_id);
138 if($parent[
"wsp_id"])
140 if($parent[
"type"] ==
"wsrt")
142 $class =
"ilobjworkspacerootfoldergui";
146 $class =
"ilobjworkspacefoldergui";
148 $ilCtrl->setParameterByClass($class,
"wsp_id", $parent[
"wsp_id"]);
149 $ilTabs->setBackTarget(
$lng->txt(
"back"),
150 $ilCtrl->getLinkTargetByClass($class,
""));
156 $ilCtrl->setParameterByClass(
"ilobjworkspacerootfoldergui",
"wsp_id",
"");
157 $ilCtrl->setParameterByClass(
"ilobjworkspacerootfoldergui",
"user", $owner);
158 $ilTabs->setBackTarget(
$lng->txt(
"back"),
159 $ilCtrl->getLinkTargetByClass(
"ilobjworkspacerootfoldergui",
"share"));
172 $ilLocator->clearItems();
175 $path = $this->tree->getPathFull($this->node_id);
178 foreach(
$path as $node)
180 $obj_class =
"ilObj".$objDefinition->getClassName($node[
"type"]).
"GUI";
182 $ilCtrl->setParameter($this,
"wsp_id", $node[
"wsp_id"]);
184 switch($node[
"type"])
187 $ilLocator->addItem(
$lng->txt(
"wsp_personal_workspace"),
$ilCtrl->getLinkTargetByClass($obj_class,
"render"));
191 case $objDefinition->isContainer($node[
"type"]):
192 $ilLocator->addItem($node[
"title"],
$ilCtrl->getLinkTargetByClass($obj_class,
"render"));
196 $ilLocator->addItem($node[
"title"],
$ilCtrl->getLinkTargetByClass($obj_class,
"edit"));
202 $ilCtrl->setParameter($this,
"wsp_id", $this->node_id);
An exception for terminatinating execution or to throw for unit testing.
GUI class for personal workspace.
renderLocator()
Build locator for current node.
executeCommand()
execute command
initTree()
Init personal tree.
Tree handler for personal workspace.