79 $this->ctrl =
$DIC->ctrl();
80 $this->lng =
$DIC->language();
81 $this->help =
$DIC[
"ilHelp"];
82 $this->obj_definition =
$DIC[
"objDefinition"];
83 $this->tpl =
$DIC[
"tpl"];
84 $this->main_menu =
$DIC[
"ilMainMenu"];
85 $this->
user = $DIC->user();
86 $this->tabs =
$DIC->tabs();
87 $this->locator =
$DIC[
"ilLocator"];
90 $ilHelp =
$DIC[
"ilHelp"];
92 $lng->loadLanguageModule(
"wsp");
96 $ilCtrl->saveParameter($this,
"wsp_id");
98 $this->node_id = (int) $_REQUEST[
"wsp_id"];
99 if (!$this->node_id || !$this->tree->isInTree($this->node_id)) {
100 $this->node_id = $this->tree->getRootId();
114 $ilCtrl->setReturn($this,
"render");
118 if ($_REQUEST[
"new_type"]) {
119 $class_name = $objDefinition->getClassName($_REQUEST[
"new_type"]);
127 if (strtolower(
$ilCtrl->getNextClass($this)) != strtolower(
"ilObj" . $class_name .
"GUI")) {
128 $ilCtrl->setCmdClass(
"ilObj" . $class_name .
"GUI");
133 $next_class =
$ilCtrl->getNextClass();
135 $node = $this->tree->getNodeData($this->node_id);
136 $next_class =
"ilObj" . $objDefinition->getClassName($node[
"type"]) .
"GUI";
137 $ilCtrl->setCmdClass($next_class);
144 $class_path =
$ilCtrl->lookupClassPath($next_class);
145 include_once($class_path);
146 $class_name =
$ilCtrl->getClassForClasspath($class_path);
147 if ($_REQUEST[
"new_type"]) {
149 $gui->setCreationMode();
171 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
173 if (!$this->tree->getRootId()) {
174 $this->tree->createTreeForUser($user_id);
185 $root = $this->tree->getNodeData($this->node_id);
186 if (
$root[
"type"] !=
"wfld" &&
$root[
"type"] !=
"wsrt") {
188 if (!$ilTabs->back_target) {
189 $owner = $this->tree->lookupOwner($this->node_id);
191 if ($owner ==
$ilUser->getId()) {
192 $parent = $this->tree->getParentNodeData($this->node_id);
193 if ($parent[
"wsp_id"]) {
194 if ($parent[
"type"] ==
"wsrt") {
195 $class =
"ilobjworkspacerootfoldergui";
197 $class =
"ilobjworkspacefoldergui";
199 $ilCtrl->setParameterByClass($class,
"wsp_id", $parent[
"wsp_id"]);
200 $ilTabs->setBackTarget(
202 $ilCtrl->getLinkTargetByClass($class,
"")
208 $ilCtrl->setParameterByClass(
"ilobjworkspacerootfoldergui",
"wsp_id",
"");
209 $ilCtrl->setParameterByClass(
"ilobjworkspacerootfoldergui",
"user", $owner);
210 $ilTabs->setBackTarget(
212 $ilCtrl->getLinkTargetByClass(
"ilobjworkspacerootfoldergui",
"share")
230 $ilLocator->clearItems();
233 $path = $this->tree->getPathFull($this->node_id);
235 foreach (
$path as $node) {
236 $obj_class =
"ilObj" . $objDefinition->getClassName($node[
"type"]) .
"GUI";
238 $ilCtrl->setParameter($this,
"wsp_id", $node[
"wsp_id"]);
240 switch ($node[
"type"]) {
242 $ilLocator->addItem(
$lng->txt(
"wsp_personal_workspace"),
$ilCtrl->getLinkTargetByClass($obj_class,
"render"));
246 case $objDefinition->isContainer($node[
"type"]):
247 $ilLocator->addItem($node[
"title"],
$ilCtrl->getLinkTargetByClass($obj_class,
"render"));
251 $ilLocator->addItem($node[
"title"],
$ilCtrl->getLinkTargetByClass($obj_class,
"edit"));
257 $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.