37 function __construct($a_node_type, $a_access_handler, $a_obj_type, $a_node_id, $a_obj_id)
39 $this->node_type = (int)$a_node_type;
40 $this->access_handler = $a_access_handler;
41 $this->obj_type = (string)$a_obj_type;
42 $this->node_id = (int)$a_node_id;
43 $this->obj_id = (int)$a_obj_id;
54 $this->obj_id, $this->sub_type, $this->sub_id);
68 static function buildAjaxHash($a_node_type, $a_node_id, $a_obj_type, $a_obj_id, $a_sub_type = null, $a_sub_id = null)
70 return $a_node_type.
";".$a_node_id.
";".$a_obj_type.
";".
71 $a_obj_id.
";".$a_sub_type.
";".$a_sub_id;
81 global $ilAccess, $ilUser;
83 if(isset(
$_GET[
"cadh"]))
85 $parts = explode(
";", (
string)
$_GET[
"cadh"]);
96 case self::TYPE_REPOSITORY:
97 $access_handler = $ilAccess;
100 case self::TYPE_WORKSPACE:
101 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
103 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
120 $dispatcher->enableCommentsSettings(
true);
132 if ($this->node_id &&
133 !$this->access_handler->checkAccess(
"visible",
"", $this->node_id) &&
134 !$this->access_handler->checkAccess(
"read",
"", $this->node_id))
139 $next_class = $ilCtrl->getNextClass($this);
140 $cmd = $ilCtrl->getCmd();
142 $ilCtrl->saveParameter($this,
"cadh");
154 include_once
"Services/Notes/classes/class.ilNoteGUI.php";
156 $note_gui->enablePrivateNotes(
true);
159 if($this->enable_comments_settings)
162 if($this->access_handler->checkAccess(
"write",
"", $this->node_id) ||
163 $this->access_handler->checkAccess(
"edit_permissions",
"", $this->node_id))
165 $note_gui->enableCommentsSettings();
170 else if($this->sub_id)
172 $note_gui->enablePublicNotes(
true);
175 $ilCtrl->forwardCommand($note_gui);
179 include_once
"Services/Tagging/classes/class.ilTaggingGUI.php";
181 $tags_gui->setObject($this->obj_id, $this->obj_type);
183 $ilCtrl->forwardCommand($tags_gui);
201 $this->sub_type = (string)$a_sub_obj_type;
202 $this->sub_id = (int)$a_sub_obj_id;
212 $this->enable_comments_settings = (bool)$a_value;
221 if ($this->node_id &&
222 !$this->access_handler->checkAccess(
"visible",
"", $this->node_id) &&
223 !$this->access_handler->checkAccess(
"read",
"", $this->node_id))
228 include_once
'Services/Object/classes/class.ilObjectListGUIFactory.php';
232 $this->header_action->enableCopy(
false);
233 $this->header_action->enableCut(
false);
234 $this->header_action->enableDelete(
false);
235 $this->header_action->enableLink(
false);
236 $this->header_action->enableInfoscreen(
false);
237 $this->header_action->enablePayment(
false);
239 switch($this->node_type)
241 case self::TYPE_REPOSITORY:
242 $this->header_action->enableSubscribe(
true);
246 case self::TYPE_WORKSPACE:
247 $this->header_action->enableSubscribe(
false);
252 $this->header_action->initItem($this->node_id, $this->obj_id,
"",
"",
254 $this->header_action->setHeaderSubObject($this->sub_type, $this->sub_id);
255 $this->header_action->setAjaxHash($this->
getAjaxHash());
257 return $this->header_action;