GUI class for personal workspace.
More...
◆ __construct()
ilPersonalWorkspaceGUI::__construct |
( |
| ) |
|
constructor
Definition at line 27 of file class.ilPersonalWorkspaceGUI.php.
28 {
30
31 $lng->loadLanguageModule(
"wsp");
32
34
35 $ilCtrl->saveParameter($this, "wsp_id");
36
37 $this->node_id = (int)
$_REQUEST[
"wsp_id"];
38 if(!$this->node_id)
39 {
40 $this->node_id = $this->tree->getRootId();
41 }
42 }
initTree()
Init personal tree.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
References $_REQUEST, $ilCtrl, $lng, and initTree().
◆ executeCommand()
ilPersonalWorkspaceGUI::executeCommand |
( |
| ) |
|
execute command
Definition at line 47 of file class.ilPersonalWorkspaceGUI.php.
48 {
50
51 $ilCtrl->setReturn($this,
"render");
53
54
56 {
57 $class_name = $objDefinition->getClassName(
$_REQUEST[
"new_type"]);
58
59
60
61
62
63
64
65 if (strtolower(
$ilCtrl->getNextClass($this)) != strtolower(
"ilObj".$class_name.
"GUI"))
66 {
67 $ilCtrl->setCmdClass(
"ilObj".$class_name.
"GUI");
68 }
69 }
70
71
72 $next_class =
$ilCtrl->getNextClass();
73 if(!$next_class)
74 {
75 $node = $this->tree->getNodeData($this->node_id);
76 $next_class = "ilObj".$objDefinition->getClassName($node["type"])."GUI";
77 $ilCtrl->setCmdClass($next_class);
78 }
79
80
82
83
84 $class_path =
$ilCtrl->lookupClassPath($next_class);
85 include_once($class_path);
86 $class_name =
$ilCtrl->getClassForClasspath($class_path);
88 {
90 $gui->setCreationMode();
91 }
92 else
93 {
95 }
97
99 {
101 }
102
103 $tpl->setLocator();
104 }
renderLocator()
Build locator for current node.
References $_REQUEST, $cmd, $ilCtrl, $tpl, ilMainMenuGUI\MODE_FULL, renderBack(), renderLocator(), and ilObject2GUI\WORKSPACE_NODE_ID.
◆ initTree()
ilPersonalWorkspaceGUI::initTree |
( |
| ) |
|
|
protected |
Init personal tree.
Definition at line 109 of file class.ilPersonalWorkspaceGUI.php.
110 {
112
114
115 include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
117 if(!$this->tree->getRootId())
118 {
119 $this->tree->createTreeForUser($user_id);
120 }
121 }
Tree handler for personal workspace.
References $ilUser.
Referenced by __construct().
◆ renderBack()
ilPersonalWorkspaceGUI::renderBack |
( |
| ) |
|
|
protected |
Definition at line 123 of file class.ilPersonalWorkspaceGUI.php.
124 {
126
127 $root = $this->tree->getNodeData($this->node_id);
128 if($root["type"] != "wfld" && $root["type"] != "wsrt")
129 {
130
131 if(!$ilTabs->back_target)
132 {
133 $owner = $this->tree->lookupOwner($this->node_id);
134
136 {
137 $parent = $this->tree->getParentNodeData($this->node_id);
138 if($parent["wsp_id"])
139 {
140 if($parent["type"] == "wsrt")
141 {
142 $class = "ilobjworkspacerootfoldergui";
143 }
144 else
145 {
146 $class = "ilobjworkspacefoldergui";
147 }
148 $ilCtrl->setParameterByClass($class,
"wsp_id", $parent[
"wsp_id"]);
149 $ilTabs->setBackTarget(
$lng->txt(
"back"),
150 $ilCtrl->getLinkTargetByClass($class,
""));
151 }
152 }
153
154 else
155 {
156 $ilCtrl->setParameterByClass(
"ilobjworkspacerootfoldergui",
"wsp_id",
"");
157 $ilCtrl->setParameterByClass(
"ilobjworkspacerootfoldergui",
"user", $owner);
158 $ilTabs->setBackTarget(
$lng->txt(
"back"),
159 $ilCtrl->getLinkTargetByClass(
"ilobjworkspacerootfoldergui",
"share"));
160 }
161 }
162 }
163 }
References $ilCtrl, $ilUser, and $lng.
Referenced by executeCommand().
◆ renderLocator()
ilPersonalWorkspaceGUI::renderLocator |
( |
| ) |
|
|
protected |
Build locator for current node.
Definition at line 168 of file class.ilPersonalWorkspaceGUI.php.
169 {
171
172 $ilLocator->clearItems();
173
174
175 $path = $this->tree->getPathFull($this->node_id);
177 {
178 foreach(
$path as $node)
179 {
180 $obj_class = "ilObj".$objDefinition->getClassName($node["type"])."GUI";
181
182 $ilCtrl->setParameter($this,
"wsp_id", $node[
"wsp_id"]);
183
184 switch($node["type"])
185 {
186 case "wsrt":
187 $ilLocator->addItem(
$lng->txt(
"wsp_personal_workspace"),
$ilCtrl->getLinkTargetByClass($obj_class,
"render"));
188 break;
189
190 case "blog":
191 case $objDefinition->isContainer($node["type"]):
192 $ilLocator->addItem($node[
"title"],
$ilCtrl->getLinkTargetByClass($obj_class,
"render"));
193 break;
194
195 default:
196 $ilLocator->addItem($node[
"title"],
$ilCtrl->getLinkTargetByClass($obj_class,
"edit"));
197 break;
198 }
199 }
200 }
201
202 $ilCtrl->setParameter($this,
"wsp_id", $this->node_id);
203 }
References $ilCtrl, $lng, $path, and $tpl.
Referenced by executeCommand().
◆ $node_id
ilPersonalWorkspaceGUI::$node_id |
|
protected |
◆ $tree
ilPersonalWorkspaceGUI::$tree |
|
protected |
The documentation for this class was generated from the following file: