39 function __construct($a_node_type, $a_access_handler, $a_obj_type, $a_node_id, $a_obj_id)
41 $this->node_type = (int)$a_node_type;
42 $this->access_handler = $a_access_handler;
43 $this->obj_type = (string)$a_obj_type;
44 $this->node_id = (int)$a_node_id;
45 $this->obj_id = (int)$a_obj_id;
56 $this->obj_id, $this->sub_type, $this->sub_id);
70 static function buildAjaxHash($a_node_type, $a_node_id, $a_obj_type, $a_obj_id, $a_sub_type = null, $a_sub_id = null)
72 return $a_node_type.
";".$a_node_id.
";".$a_obj_type.
";".
73 $a_obj_id.
";".$a_sub_type.
";".$a_sub_id;
85 if(isset(
$_GET[
"cadh"]))
87 $parts = explode(
";", (
string)
$_GET[
"cadh"]);
98 case self::TYPE_REPOSITORY:
99 $access_handler = $ilAccess;
102 case self::TYPE_WORKSPACE:
103 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
105 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
122 $dispatcher->enableCommentsSettings(
true);
134 if ($this->node_id &&
135 !$this->access_handler->checkAccess(
"visible",
"", $this->node_id) &&
136 !$this->access_handler->checkAccess(
"read",
"", $this->node_id))
141 $next_class = $ilCtrl->getNextClass($this);
142 $cmd = $ilCtrl->getCmd();
144 $ilCtrl->saveParameter($this,
"cadh");
156 include_once
"Services/Notes/classes/class.ilNoteGUI.php";
158 $note_gui->enablePrivateNotes(
true);
161 if($this->enable_comments_settings)
164 if($this->access_handler->checkAccess(
"write",
"", $this->node_id) ||
165 $this->access_handler->checkAccess(
"edit_permissions",
"", $this->node_id))
167 $note_gui->enableCommentsSettings();
172 else if($this->sub_id)
174 $note_gui->enablePublicNotes(
true);
177 $ilCtrl->forwardCommand($note_gui);
181 include_once
"Services/Tagging/classes/class.ilTaggingGUI.php";
183 $tags_gui->setObject($this->obj_id, $this->obj_type);
184 $ilCtrl->forwardCommand($tags_gui);
187 case "ilobjectactivationgui":
188 $ilCtrl->setParameter($this,
"parent_id", (
int)
$_REQUEST[
'parent_id']);
189 include_once
'Services/Object/classes/class.ilObjectActivationGUI.php';
191 $ilCtrl->forwardCommand($act_gui);
195 include_once(
"./Services/Rating/classes/class.ilRatingGUI.php");
199 $rating_gui->setObject($this->obj_id, $this->obj_type, $this->sub_id, $this->sub_type);
204 $rating_gui->setObject($this->obj_id, $this->obj_type);
206 $ilCtrl->forwardCommand($rating_gui);
207 if($this->rating_callback)
211 $ilCtrl->redirect($this->rating_callback[0], $this->rating_callback[1]);
230 $this->sub_type = (string)$a_sub_obj_type;
231 $this->sub_id = (int)$a_sub_obj_id;
241 $this->enable_comments_settings = (bool)$a_value;
252 $this->rating_callback = array($a_gui, $a_cmd);
261 if ($this->node_id &&
262 !$this->access_handler->checkAccess(
"visible",
"", $this->node_id) &&
263 !$this->access_handler->checkAccess(
"read",
"", $this->node_id))
268 include_once
'Services/Object/classes/class.ilObjectListGUIFactory.php';
272 $this->header_action->enableCopy(
false);
273 $this->header_action->enableCut(
false);
274 $this->header_action->enableDelete(
false);
275 $this->header_action->enableLink(
false);
276 $this->header_action->enableInfoscreen(
false);
277 $this->header_action->enablePayment(
false);
278 $this->header_action->enableTimings(
false);
280 switch($this->node_type)
282 case self::TYPE_REPOSITORY:
283 $this->header_action->enableSubscribe(
true);
287 case self::TYPE_WORKSPACE:
288 $this->header_action->enableSubscribe(
false);
293 $this->header_action->initItem($this->node_id, $this->obj_id,
"",
"",
295 $this->header_action->setHeaderSubObject($this->sub_type, $this->sub_id);
296 $this->header_action->setAjaxHash($this->
getAjaxHash());
298 return $this->header_action;