56 $this->
ctrl = $DIC->ctrl();
57 $this->
lng = $DIC->language();
58 $this->
help = $DIC[
"ilHelp"];
59 $this->obj_definition =
$DIC[
"objDefinition"];
60 $this->tpl =
$DIC->ui()->mainTemplate();
61 $this->
user = $DIC->user();
62 $this->
tabs = $DIC->tabs();
63 $this->
locator = $DIC[
"ilLocator"];
64 $ilCtrl =
$DIC->ctrl();
77 $ilCtrl->saveParameter($this,
"wsp_id");
79 $this->node_id = $this->std_request->getWspId();
80 if (!$this->node_id || !$this->tree->isInTree($this->node_id)) {
81 $this->node_id = $this->tree->getRootId();
83 $this->tool_context =
$DIC->globalScreen()->tool()->context();
92 if ($this->
settings->get(
"disable_personal_workspace")) {
96 $ilCtrl->setReturn($this,
"render");
98 if (!in_array($ilCtrl->getCmd(), [
"shareFilter"]) &&
99 !in_array(strtolower($ilCtrl->getCmdClass()), [
"ilobjectownershipmanagementgui"])
105 if ($this->std_request->getNewType()) {
106 $class_name = $objDefinition->getClassName(
107 $this->std_request->getNewType()
116 if (strtolower($ilCtrl->getNextClass($this)) !== strtolower(
"ilObj" . $class_name .
"GUI")) {
117 $this->
ctrl->setParameterByClass(
"ilObj" . $class_name .
"GUI",
"new_type", $this->std_request->getNewType());
118 $ilCtrl->redirectByClass(
"ilObj" . $class_name .
"GUI", $ilCtrl->getCmd());
123 $next_class = $ilCtrl->getNextClass();
125 $node = $this->tree->getNodeData($this->node_id);
126 if (isset($node[
"type"])) {
127 $next_class =
"ilObj" . $objDefinition->getClassName($node[
"type"]) .
"GUI";
129 $next_class =
"ilObjWorkspaceRootFolderGUI";
131 $ilCtrl->redirectByClass($next_class, $ilCtrl->getCmd());
138 $class_path = $ilCtrl->lookupClassPath($next_class);
139 $class_name = $ilCtrl->getClassForClasspath($class_path);
140 if ($this->std_request->getNewType()) {
142 $gui->setCreationMode();
146 $ilCtrl->forwardCommand($gui);
160 if (!$this->tree->getRootId()) {
161 $this->tree->createTreeForUser(
$user_id);
172 $root = $this->tree->getNodeData($this->node_id);
173 if ($root[
"type"] !=
"wfld" && $root[
"type"] !=
"wsrt") {
175 if (!$ilTabs->back_target) {
176 $owner = $this->tree->lookupOwner($this->node_id);
178 if ($owner == $ilUser->getId()) {
179 $parent = $this->tree->getParentNodeData($this->node_id);
180 if ($parent[
"wsp_id"]) {
181 if ($parent[
"type"] ==
"wsrt") {
182 $class =
"ilobjworkspacerootfoldergui";
184 $class =
"ilobjworkspacefoldergui";
186 $ilCtrl->setParameterByClass($class,
"wsp_id", $parent[
"wsp_id"]);
187 $ilTabs->setBackTarget(
189 $ilCtrl->getLinkTargetByClass($class,
"")
195 $ilCtrl->setParameterByClass(
"ilobjworkspacerootfoldergui",
"wsp_id",
"");
196 $ilCtrl->setParameterByClass(
"ilobjworkspacerootfoldergui",
"user", $owner);
197 $ilTabs->setBackTarget(
199 $ilCtrl->getLinkTargetByClass(
"ilobjworkspacerootfoldergui",
"share")
216 $ilLocator->clearItems();
219 $path = $this->tree->getPathFull($this->node_id);
221 foreach (
$path as $node) {
222 $obj_class =
"ilObj" . $objDefinition->getClassName($node[
"type"]) .
"GUI";
224 $ilCtrl->setParameter($this,
"wsp_id", $node[
"wsp_id"]);
226 switch ($node[
"type"]) {
228 $ilLocator->addItem(
$lng->
txt(
"mm_personal_and_shared_r"), $ilCtrl->getLinkTargetByClass($obj_class,
"render"));
232 case $objDefinition->isContainer($node[
"type"]):
233 $ilLocator->addItem($node[
"title"], $ilCtrl->getLinkTargetByClass($obj_class,
"render"));
237 $ilLocator->addItem($node[
"title"], $ilCtrl->getLinkTargetByClass($obj_class,
"edit"));
243 $ilCtrl->setParameter($this,
"wsp_id", $this->node_id);
Class ilCtrl provides processing control methods.
Base class for ILIAS Exception handling.
loadLanguageModule(string $a_module)
Load language module.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
parses the objects.xml it handles the xml-description of all ilias objects
GUI class for personal workspace.
renderLocator()
Build locator for current node.
ilObjectDefinition $obj_definition
ContextServices $tool_context
ilGlobalTemplateInterface $tpl
StandardGUIRequest $std_request
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setLocator()
Insert locator.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc