GUI class for personal workspace.
More...
◆ __construct()
ilPersonalWorkspaceGUI::__construct |
( |
| ) |
|
constructor
Definition at line 27 of file class.ilPersonalWorkspaceGUI.php.
References $ilCtrl, $lng, and initTree().
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();
initTree()
Init personal tree.
◆ executeCommand()
ilPersonalWorkspaceGUI::executeCommand |
( |
| ) |
|
execute command
Definition at line 47 of file class.ilPersonalWorkspaceGUI.php.
References $cmd, $ilCtrl, $tpl, ilMainMenuGUI\MODE_FULL, renderBack(), renderLocator(), and ilObject2GUI\WORKSPACE_NODE_ID.
51 $ilCtrl->setReturn($this,
"render");
52 $cmd = $ilCtrl->getCmd();
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();
96 $ilCtrl->forwardCommand($gui);
renderLocator()
Build locator for current node.
◆ initTree()
ilPersonalWorkspaceGUI::initTree |
( |
| ) |
|
|
protected |
Init personal tree.
Definition at line 109 of file class.ilPersonalWorkspaceGUI.php.
References $ilUser.
Referenced by __construct().
113 $user_id = $ilUser->getId();
115 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
117 if(!$this->tree->getRootId())
119 $this->tree->createTreeForUser($user_id);
Tree handler for personal workspace.
◆ renderBack()
ilPersonalWorkspaceGUI::renderBack |
( |
| ) |
|
|
protected |
Definition at line 123 of file class.ilPersonalWorkspaceGUI.php.
References $ilCtrl, $ilUser, and $lng.
Referenced by executeCommand().
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);
135 if($owner == $ilUser->getId())
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"));
◆ renderLocator()
ilPersonalWorkspaceGUI::renderLocator |
( |
| ) |
|
|
protected |
Build locator for current node.
Definition at line 168 of file class.ilPersonalWorkspaceGUI.php.
References $ilCtrl, $lng, $path, and $tpl.
Referenced by executeCommand().
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);
◆ $node_id
ilPersonalWorkspaceGUI::$node_id |
|
protected |
◆ $tree
ilPersonalWorkspaceGUI::$tree |
|
protected |
The documentation for this class was generated from the following file: