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;
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);
182 $ilCtrl->forwardCommand($tags_gui);
185 case "ilobjectactivationgui":
186 $ilCtrl->setParameter($this,
"parent_id", (
int)
$_REQUEST[
'parent_id']);
187 include_once
'Services/Object/classes/class.ilObjectActivationGUI.php';
189 $ilCtrl->forwardCommand($act_gui);
207 $this->sub_type = (string)$a_sub_obj_type;
208 $this->sub_id = (int)$a_sub_obj_id;
218 $this->enable_comments_settings = (bool)$a_value;
227 if ($this->node_id &&
228 !$this->access_handler->checkAccess(
"visible",
"", $this->node_id) &&
229 !$this->access_handler->checkAccess(
"read",
"", $this->node_id))
234 include_once
'Services/Object/classes/class.ilObjectListGUIFactory.php';
238 $this->header_action->enableCopy(
false);
239 $this->header_action->enableCut(
false);
240 $this->header_action->enableDelete(
false);
241 $this->header_action->enableLink(
false);
242 $this->header_action->enableInfoscreen(
false);
243 $this->header_action->enablePayment(
false);
244 $this->header_action->enableTimings(
false);
246 switch($this->node_type)
248 case self::TYPE_REPOSITORY:
249 $this->header_action->enableSubscribe(
true);
253 case self::TYPE_WORKSPACE:
254 $this->header_action->enableSubscribe(
false);
259 $this->header_action->initItem($this->node_id, $this->obj_id,
"",
"",
261 $this->header_action->setHeaderSubObject($this->sub_type, $this->sub_id);
262 $this->header_action->setAjaxHash($this->
getAjaxHash());
264 return $this->header_action;