76 $this->ctrl = $DIC->ctrl();
77 $this->lng = $DIC->language();
78 $this->help = $DIC[
"ilHelp"];
79 $this->obj_definition = $DIC[
"objDefinition"];
80 $this->tpl = $DIC[
"tpl"];
81 $this->main_menu = $DIC[
"ilMainMenu"];
82 $this->
user = $DIC->user();
83 $this->tabs = $DIC->tabs();
84 $this->locator = $DIC[
"ilLocator"];
86 $lng = $DIC->language();
87 $ilHelp = $DIC[
"ilHelp"];
89 $lng->loadLanguageModule(
"wsp");
93 $ilCtrl->saveParameter($this,
"wsp_id");
95 $this->node_id = (int) $_REQUEST[
"wsp_id"];
96 if (!$this->node_id) {
97 $this->node_id = $this->tree->getRootId();
111 $ilCtrl->setReturn($this,
"render");
115 if ($_REQUEST[
"new_type"]) {
116 $class_name = $objDefinition->getClassName($_REQUEST[
"new_type"]);
124 if (strtolower(
$ilCtrl->getNextClass($this)) != strtolower(
"ilObj" . $class_name .
"GUI")) {
125 $ilCtrl->setCmdClass(
"ilObj" . $class_name .
"GUI");
130 $next_class =
$ilCtrl->getNextClass();
132 $node = $this->tree->getNodeData($this->node_id);
133 $next_class =
"ilObj" . $objDefinition->getClassName($node[
"type"]) .
"GUI";
134 $ilCtrl->setCmdClass($next_class);
141 $class_path =
$ilCtrl->lookupClassPath($next_class);
142 include_once($class_path);
143 $class_name =
$ilCtrl->getClassForClasspath($class_path);
144 if ($_REQUEST[
"new_type"]) {
146 $gui->setCreationMode();
168 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
170 if (!$this->tree->getRootId()) {
171 $this->tree->createTreeForUser($user_id);
182 $root = $this->tree->getNodeData($this->node_id);
183 if ($root[
"type"] !=
"wfld" && $root[
"type"] !=
"wsrt") {
185 if (!$ilTabs->back_target) {
186 $owner = $this->tree->lookupOwner($this->node_id);
188 if ($owner ==
$ilUser->getId()) {
189 $parent = $this->tree->getParentNodeData($this->node_id);
190 if ($parent[
"wsp_id"]) {
191 if ($parent[
"type"] ==
"wsrt") {
192 $class =
"ilobjworkspacerootfoldergui";
194 $class =
"ilobjworkspacefoldergui";
196 $ilCtrl->setParameterByClass($class,
"wsp_id", $parent[
"wsp_id"]);
197 $ilTabs->setBackTarget(
199 $ilCtrl->getLinkTargetByClass($class,
"")
205 $ilCtrl->setParameterByClass(
"ilobjworkspacerootfoldergui",
"wsp_id",
"");
206 $ilCtrl->setParameterByClass(
"ilobjworkspacerootfoldergui",
"user", $owner);
207 $ilTabs->setBackTarget(
209 $ilCtrl->getLinkTargetByClass(
"ilobjworkspacerootfoldergui",
"share")
227 $ilLocator->clearItems();
230 $path = $this->tree->getPathFull($this->node_id);
232 foreach (
$path as $node) {
233 $obj_class =
"ilObj" . $objDefinition->getClassName($node[
"type"]) .
"GUI";
235 $ilCtrl->setParameter($this,
"wsp_id", $node[
"wsp_id"]);
237 switch ($node[
"type"]) {
239 $ilLocator->addItem(
$lng->txt(
"wsp_personal_workspace"),
$ilCtrl->getLinkTargetByClass($obj_class,
"render"));
243 case $objDefinition->isContainer($node[
"type"]):
244 $ilLocator->addItem($node[
"title"],
$ilCtrl->getLinkTargetByClass($obj_class,
"render"));
248 $ilLocator->addItem($node[
"title"],
$ilCtrl->getLinkTargetByClass($obj_class,
"edit"));
254 $ilCtrl->setParameter($this,
"wsp_id", $this->node_id);
GUI class for personal workspace.
initTree()
Init personal tree.
renderLocator()
Build locator for current node.
Tree handler for personal workspace.
executeCommand()
execute command