ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilObject2GUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4include_once("./Services/Object/classes/class.ilObjectGUI.php");
5
28abstract class ilObject2GUI extends ilObjectGUI
29{
30 protected $object_id;
31 protected $node_id;
32 protected $creation_forms = array();
33 protected $id_type = array();
34 protected $parent_id;
35 public $tree;
36 protected $access_handler;
37
38 const OBJECT_ID = 0;
44
52 function __construct($a_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0)
53 {
54 global $objDefinition, $tpl, $ilCtrl, $ilErr, $lng, $ilTabs, $tree, $ilAccess;
55
56 if (!isset($ilErr))
57 {
58 $ilErr = new ilErrorHandling();
59 $ilErr->setErrorHandling(PEAR_ERROR_CALLBACK,array($ilErr,'errorHandler'));
60 }
61 else
62 {
63 $this->ilErr =& $ilErr;
64 }
65
66 $this->id_type = $a_id_type;
67 $this->parent_id = $a_parent_node_id;
68 $this->type = $this->getType();
69 $this->html = "";
70
71 // use globals instead?
72 $this->tabs_gui = $ilTabs;
73 $this->objDefinition = $objDefinition;
74 $this->tpl = $tpl;
75 $this->ctrl = $ilCtrl;
76 $this->lng = $lng;
77
78 $params = array();
79 switch($this->id_type)
80 {
82 $this->node_id = $a_id;
83 $this->object_id = ilObject::_lookupObjectId($this->node_id);
84 $this->tree = $tree;
85 $this->access_handler = $ilAccess;
86 $this->call_by_reference = true; // needed for prepareOutput()
87 $params[] = "ref_id";
88 break;
89
91 $this->object_id = $a_id;
92 $this->tree = $tree;
93 $this->access_handler = $ilAccess;
94 $params[] = "obj_id"; // ???
95 break;
96
98 global $ilUser;
99 $this->node_id = $a_id;
100 include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
101 $this->tree = new ilWorkspaceTree($ilUser->getId());
102 $this->object_id = $this->tree->lookupObjectId($this->node_id);
103 include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
104 $this->access_handler = new ilWorkspaceAccessHandler($this->tree);
105 $params[] = "wsp_id";
106 break;
107
109 global $ilUser;
110 $this->object_id = $a_id;
111 include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
112 $this->tree = new ilWorkspaceTree($ilUser->getId());
113 include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
114 $this->access_handler = new ilWorkspaceAccessHandler($this->tree);
115 $params[] = "obj_id"; // ???
116 break;
117
119 $this->object_id = $a_id;
120 include_once('./Modules/Portfolio/classes/class.ilPortfolioAccessHandler.php');
121 $this->access_handler = new ilPortfolioAccessHandler();
122 $params[] = "prt_id";
123 break;
124
125 case self::OBJECT_ID:
126 $this->object_id = $a_id;
127 include_once "Services/Object/classes/class.ilDummyAccessHandler.php";
128 $this->access_handler = new ilDummyAccessHandler();
129 $params[] = "obj_id";
130 break;
131 }
132 $this->ctrl->saveParameter($this, $params);
133
134
135
136 // old stuff for legacy code (obsolete?)
137 if(!$this->object_id)
138 {
139 $this->creation_mode = true;
140 }
141 if($this->node_id)
142 {
143 // add parent node id if missing
144 if(!$this->parent_id && $this->tree)
145 {
146 $this->parent_id = $this->tree->getParentId($this->node_id);
147 }
148 }
149 $this->ref_id = $this->node_id;
150 $this->obj_id = $this->object_id;
151
152
153
154 $this->assignObject();
155
156 // set context
157 if (is_object($this->object))
158 {
159 $this->ctrl->setContext($this->object->getId(), $this->object->getType());
160 }
161
162 $this->afterConstructor();
163 }
164
168 protected function afterConstructor()
169 {
170 }
171
175 function &executeCommand()
176 {
177 global $rbacsystem;
178
179 $next_class = $this->ctrl->getNextClass($this);
180 $cmd = $this->ctrl->getCmd();
181
182 $this->prepareOutput();
183
184 switch($next_class)
185 {
186 case "ilworkspaceaccessgui";
187 if($this->node_id)
188 {
189 $this->tabs_gui->activateTab("id_permissions");
190
191 include_once('./Services/PersonalWorkspace/classes/class.ilWorkspaceAccessGUI.php');
192 $wspacc = new ilWorkspaceAccessGUI($this->node_id, $this->getAccessHandler());
193 $this->ctrl->forwardCommand($wspacc);
194 break;
195 }
196
197 default:
198 if(!$cmd)
199 {
200 $cmd = "render";
201 }
202 return $this->$cmd();
203 }
204
205 return true;
206 }
207
211 final protected function assignObject()
212 {
213 if ($this->object_id != 0)
214 {
215 switch($this->id_type)
216 {
217 case self::OBJECT_ID:
221 $this->object = ilObjectFactory::getInstanceByObjId($this->object_id);
222 break;
223
225 $this->object = ilObjectFactory::getInstanceByRefId($this->node_id);
226 break;
227
229 // to be discussed
230 $this->object = ilObjectFactory::getInstanceByObjId($this->object_id);
231 break;
232 }
233 }
234 }
235
241 protected function getAccessHandler()
242 {
244 }
245
249 final protected function setLocator()
250 {
251 global $ilLocator, $tpl;
252
253 if ($this->omit_locator)
254 {
255 return;
256 }
257
258 switch($this->id_type)
259 {
261 $ref_id = $this->node_id
262 ? $this->node_id
264 $ilLocator->addRepositoryItems($ref_id);
265
266 // not so nice workaround: todo: handle $ilLocator as tabs in ilTemplate
267 if ($_GET["admin_mode"] == "" &&
268 strtolower($this->ctrl->getCmdClass()) == "ilobjrolegui")
269 {
270 $this->ctrl->setParameterByClass("ilobjrolegui",
271 "rolf_ref_id", $_GET["rolf_ref_id"]);
272 $this->ctrl->setParameterByClass("ilobjrolegui",
273 "obj_id", $_GET["obj_id"]);
274 $ilLocator->addItem($this->lng->txt("role"),
275 $this->ctrl->getLinkTargetByClass(array("ilpermissiongui",
276 "ilobjrolegui"), "perm"));
277 }
278
279 // in workspace this is done in ilPersonalWorkspaceGUI
280 if($this->object_id)
281 {
282 $this->addLocatorItems();
283 }
284 $tpl->setLocator();
285
286 break;
287
289 // :TODO:
290 break;
291 }
292
293
294 }
295
299 public function delete()
300 {
301 switch($this->id_type)
302 {
305 return parent::deleteObject();
306
309 return $this->deleteConfirmation();
310
311 case self::OBJECT_ID:
313 // :TODO: should this ever occur?
314 break;
315 }
316 }
317
323 protected function deleteConfirmation()
324 {
325 global $lng, $tpl, $objDefinition;
326
327 $node_id = (int)$_REQUEST["item_ref_id"];
328 if (!$node_id)
329 {
330 ilUtil::sendFailure($lng->txt("no_checkbox"), true);
331 $this->ctrl->redirect($this, "");
332 }
333
334 // on cancel or fail we return to parent node
335 $parent_node = $this->tree->getParentId($node_id);
336 $this->ctrl->setParameter($this, "wsp_id", $parent_node);
337
338 include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
339 $cgui = new ilConfirmationGUI();
340 $cgui->setHeaderText($lng->txt("info_delete_sure")."<br/>".
341 $lng->txt("info_delete_warning_no_trash"));
342
343 $cgui->setFormAction($this->ctrl->getFormAction($this));
344 $cgui->setCancel($lng->txt("cancel"), "cancelDelete");
345 $cgui->setConfirm($lng->txt("confirm"), "confirmedDelete");
346
347 $a_ids = array($node_id);
348 foreach ($a_ids as $node_id)
349 {
350 $children = $this->tree->getSubTree($this->tree->getNodeData($node_id));
351 foreach($children as $child)
352 {
353 $node_id = $child["wsp_id"];
354 $obj_id = $this->tree->lookupObjectId($node_id);
356 $title = call_user_func(array(ilObjectFactory::getClassByType($type),'_lookupTitle'), $obj_id);
357
358 // if anything fails, abort the whole process
359 if(!$this->checkPermissionBool("delete", "", "", $node_id))
360 {
361 ilUtil::sendFailure($lng->txt("msg_no_perm_delete")." ".$title, true);
362 $this->ctrl->redirect($this);
363 }
364
365 $cgui->addItem("id[]", $node_id, $title,
366 ilObject::_getIcon($obj_id, "small", $type),
367 $lng->txt("icon")." ".$lng->txt("obj_".$type));
368 }
369 }
370
371 $tpl->setContent($cgui->getHTML());
372 }
373
377 public function confirmedDelete()
378 {
379 switch($this->id_type)
380 {
383 return parent::confirmedDeleteObject();
384
387 return $this->deleteConfirmedObjects();
388
389 case self::OBJECT_ID:
391 // :TODO: should this ever occur?
392 break;
393 }
394 }
395
401 protected function deleteConfirmedObjects()
402 {
403 global $lng, $objDefinition;
404
405 if(sizeof($_POST["id"]))
406 {
407 // #18797 - because of parent/child relations gather all nodes first
408 $del_nodes = array();
409 foreach($_POST["id"] as $node_id)
410 {
411 $del_nodes[$node_id] = $this->tree->getNodeData($node_id);
412 }
413
414 foreach($del_nodes as $node_id => $node)
415 {
416 // tree/reference
417 $this->tree->deleteReference($node_id);
418 if($this->tree->isInTree($node_id))
419 {
420 $this->tree->deleteTree($node);
421 }
422
423 // permission
424 $this->getAccessHandler()->removePermission($node_id);
425
426 // object
427 $object = ilObjectFactory::getInstanceByObjId($node["obj_id"], false);
428 if($object)
429 {
430 $object->delete();
431 }
432 }
433
434 ilUtil::sendSuccess($lng->txt("msg_removed"), true);
435 }
436 else
437 {
438 ilUtil::sendFailure($lng->txt("no_checkbox"), true);
439 }
440
441 $this->ctrl->redirect($this, "");
442 }
443
444 public function getHTML() { return parent::getHTML(); }
445
449 final public function withReferences() { return parent::withReferences(); }
450 final public function setCreationMode($a_mode = true) { return parent::setCreationMode($a_mode); }
451 final public function getCreationMode() { return parent::getCreationMode(); }
452 final protected function prepareOutput() { return parent::prepareOutput(); }
453 protected function setTitleAndDescription() { return parent::setTitleAndDescription(); }
454 final protected function showUpperIcon() { return parent::showUpperIcon(); }
455// final private function showMountWebfolderIcon() { return parent::showMountWebfolderIcon(); }
456 final protected function omitLocator($a_omit = true) { return parent::omitLocator($a_omit); }
457 final protected function getTargetFrame($a_cmd, $a_target_frame = "") { return parent::getTargetFrame($a_cmd, $a_target_frame); }
458 final protected function setTargetFrame($a_cmd, $a_target_frame) { return parent::setTargetFrame($a_cmd, $a_target_frame); }
459 final public function isVisible() { return parent::isVisible(); }
460 final protected function getCenterColumnHTML() { return parent::getCenterColumnHTML(); }
461 final protected function getRightColumnHTML() { return parent::getRightColumnHTML(); }
462 final protected function setColumnSettings($column_gui) { return parent::setColumnSettings($column_gui); }
463 final protected function checkPermission($a_perm, $a_cmd = "") { return parent::checkPermission($a_perm, $a_cmd); }
464
465 // -> ilContainerGUI
466 final protected function showPossibleSubObjects() { return parent::showPossibleSubObjects(); }
467 // -> ilRepUtilGUI
468 final public function trash() { return parent::trashObject(); } // done
469 // -> ilRepUtil
470 final public function undelete() { return parent::undeleteObject(); } // done
471 final public function cancelDelete() { return parent::cancelDeleteObject(); } // ok
472 final public function removeFromSystem() { return parent::removeFromSystemObject(); } // done
473 final protected function redirectToRefId() { return parent::redirectToRefId(); } // ok
474
475 // -> stefan
476 final protected function fillCloneTemplate($a_tpl_varname,$a_type) { return parent::fillCloneTemplate($a_tpl_varname,$a_type); }
477 final protected function fillCloneSearchTemplate($a_tpl_varname,$a_type) { return parent::fillCloneSearchTemplate($a_tpl_varname,$a_type); }
478 final protected function searchCloneSource() { return parent::searchCloneSourceObject(); }
479 final public function cloneAll() { return parent::cloneAllObject(); }
480 final protected function buildCloneSelect($existing_objs) { return parent::buildCloneSelect($existing_objs); }
481
482 // -> ilAdministration
483 final private function displayList() { return parent::displayList(); }
484// final private function setAdminTabs() { return parent::setAdminTabs(); }
485// final public function getAdminTabs($a) { return parent::getAdminTabs($a); }
486 final protected function addAdminLocatorItems() { return parent::addAdminLocatorItems(); }
487
491 public function view()
492 {
493 switch($this->id_type)
494 {
497 return parent::viewObject();
498
501 return $this->render();
502
503 case self::OBJECT_ID:
505 // :TODO: should this ever occur? do nothing or edit() ?!
506 break;
507 }
508 }
509
515 protected function setTabs()
516 {
517 global $ilTabs, $lng;
518
519 switch($this->id_type)
520 {
523 if ($this->checkPermissionBool("edit_permission"))
524 {
525 $ilTabs->addTab("id_permissions",
526 $lng->txt("perm_settings"),
527 $this->ctrl->getLinkTargetByClass(array(get_class($this), "ilpermissiongui"), "perm"));
528 }
529 break;
530
533 // only files and blogs can be shared for now
534 if ($this->checkPermissionBool("edit_permission") && in_array($this->type, array("file", "blog")) && $this->node_id)
535 {
536 $ilTabs->addTab("id_permissions",
537 $lng->txt("wsp_permissions"),
538 $this->ctrl->getLinkTargetByClass(array(get_class($this), "ilworkspaceaccessgui"), "share"));
539 }
540 break;
541 }
542 }
543
547// final private function setSubObjects() { die("ilObject2GUI::setSubObjects() is deprecated."); }
548// final public function getFormAction() { die("ilObject2GUI::getFormAction() is deprecated."); }
549// final protected function setFormAction() { die("ilObject2GUI::setFormAction() is deprecated."); }
550 final protected function getReturnLocation() { die("ilObject2GUI::getReturnLocation() is deprecated."); }
551 final protected function setReturnLocation() { die("ilObject2GUI::setReturnLocation() is deprecated."); }
552 final protected function showActions() { die("ilObject2GUI::showActions() is deprecated."); }
553 final protected function getTitlesByRefId() { die("ilObject2GUI::getTitlesByRefId() is deprecated."); }
554 final protected function getTabs() {nj(); die("ilObject2GUI::getTabs() is deprecated."); }
555 final protected function __showButton() { die("ilObject2GUI::__showButton() is deprecated."); }
556 final protected function hitsperpageObject() { die("ilObject2GUI::hitsperpageObject() is deprecated."); }
557 final protected function __initTableGUI() { die("ilObject2GUI::__initTableGUI() is deprecated."); }
558 final protected function __setTableGUIBasicData() { die("ilObject2GUI::__setTableGUIBasicData() is deprecated."); }
559
563 protected function addLocatorItems() {}
564
568 abstract function getType();
569
573// final private function permObject() { parent::permObject(); }
574// final private function permSaveObject() { parent::permSaveObject(); }
575// final private function infoObject() { parent::infoObject(); }
576// final private function __buildRoleFilterSelect() { parent::__buildRoleFilterSelect(); }
577// final private function __filterRoles() { parent::__filterRoles(); }
578// final private function ownerObject() { parent::ownerObject(); }
579// final private function changeOwnerObject() { parent::changeOwnerObject(); }
580// final private function addRoleObject() { parent::addRoleObject(); }
581// final private function setActions() { die("ilObject2GUI::setActions() is deprecated."); }
582// final protected function getActions() { die("ilObject2GUI::getActions() is deprecated."); }
583
587 public function create() { parent::createObject(); }
588 public function save() { parent::saveObject(); }
589 public function edit() { parent::editObject(); }
590 public function update() { parent::updateObject(); }
591 public function cancel() { parent::cancelObject(); }
592
601 protected function initCreationForms($a_new_type)
602 {
603 $forms = parent::initCreationForms($a_new_type);
604
605 // cloning doesn't work in workspace yet
606 if($this->id_type == self::WORKSPACE_NODE_ID)
607 {
608 unset($forms[self::CFORM_CLONE]);
609 }
610
611 return $forms;
612 }
613
619 function importFile()
620 {
621 parent::importFileObject($this->parent_id);
622 }
623
630 protected function putObjectInTree(ilObject $a_obj, $a_parent_node_id = null)
631 {
632 global $rbacreview, $ilUser, $objDefinition;
633
634 $this->object_id = $a_obj->getId();
635
636 if(!$a_parent_node_id)
637 {
638 $a_parent_node_id = $this->parent_id;
639 }
640
641 // add new object to custom parent container
642 if((int)$_REQUEST["crtptrefid"])
643 {
644 $a_parent_node_id = (int)$_REQUEST["crtptrefid"];
645 }
646
647 switch($this->id_type)
648 {
651 if(!$this->node_id)
652 {
653 $a_obj->createReference();
654 $this->node_id = $a_obj->getRefId();
655 }
656 $a_obj->putInTree($a_parent_node_id);
657 $a_obj->setPermissions($a_parent_node_id);
658
659 // rbac log
660 include_once "Services/AccessControl/classes/class.ilRbacLog.php";
661 $rbac_log_roles = $rbacreview->getParentRoleIds($this->node_id, false);
662 $rbac_log = ilRbacLog::gatherFaPa($this->node_id, array_keys($rbac_log_roles), true);
663 ilRbacLog::add(ilRbacLog::CREATE_OBJECT, $this->node_id, $rbac_log);
664
665 $this->ctrl->setParameter($this, "ref_id", $this->node_id);
666 break;
667
670 if(!$this->node_id)
671 {
672 $this->node_id = $this->tree->insertObject($a_parent_node_id, $this->object_id);
673 }
674 $this->getAccessHandler()->setPermissions($a_parent_node_id, $this->node_id);
675
676 $this->ctrl->setParameter($this, "wsp_id", $this->node_id);
677 break;
678
679 case self::OBJECT_ID:
681 // do nothing
682 break;
683 }
684
685 // BEGIN ChangeEvent: Record save object.
686 require_once('Services/Tracking/classes/class.ilChangeEvent.php');
687 ilChangeEvent::_recordWriteEvent($this->object_id, $ilUser->getId(), 'create');
688 // END ChangeEvent: Record save object.
689
690 // use forced callback after object creation
691 self::handleAfterSaveCallback($a_obj, $_REQUEST["crtcb"]);
692 }
693
700 public static function handleAfterSaveCallback(ilObject $a_obj, $a_callback_ref_id)
701 {
702 global $objDefinition;
703
704 $a_callback_ref_id = (int)$a_callback_ref_id;
705 if($a_callback_ref_id)
706 {
707 $callback_type = ilObject::_lookupType($a_callback_ref_id, true);
708 $class_name = "ilObj".$objDefinition->getClassName($callback_type)."GUI";
709 $location = $objDefinition->getLocation($callback_type);
710 include_once($location."/class.".$class_name.".php");
711 if (in_array(strtolower($class_name), array("ilobjitemgroupgui")))
712 {
713 $callback_obj = new $class_name($a_callback_ref_id);
714 }
715 else
716 {
717 $callback_obj = new $class_name(null, $a_callback_ref_id, true, false);
718 }
719 $callback_obj->afterSaveCallback($a_obj);
720 }
721 }
722
732 protected function checkPermissionBool($a_perm, $a_cmd = "", $a_type = "", $a_node_id = null)
733 {
734 global $ilUser;
735
736 if($a_perm == "create")
737 {
738 if(!$a_node_id)
739 {
740 $a_node_id = $this->parent_id;
741 }
742 if($a_node_id)
743 {
744 return $this->getAccessHandler()->checkAccess($a_perm."_".$a_type, $a_cmd, $a_node_id);
745 }
746 }
747 else
748 {
749
750 if (!$a_node_id)
751 {
752 $a_node_id = $this->node_id;
753 }
754 if($a_node_id)
755 {
756 return $this->getAccessHandler()->checkAccess($a_perm, $a_cmd, $a_node_id);
757 }
758 }
759
760 // if we do not have a node id, check if current user is owner
761 if($this->obj_id && $this->object->getOwner() == $ilUser->getId())
762 {
763 return true;
764 }
765 return false;
766 }
767
775 protected function initHeaderAction($a_sub_type = null, $a_sub_id = null)
776 {
777 global $ilAccess;
778
779 if($this->id_type == self::WORKSPACE_NODE_ID)
780 {
781 if(!$this->creation_mode && $this->object_id)
782 {
783 include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
785 $this->getAccessHandler(), $this->getType(), $this->node_id, $this->object_id);
786
787 $dispatcher->setSubObject($a_sub_type, $a_sub_id);
788
789 include_once "Services/Object/classes/class.ilObjectListGUI.php";
790 ilObjectListGUI::prepareJSLinks($this->ctrl->getLinkTarget($this, "redrawHeaderAction", "", true),
791 $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "ilnotegui"), "", "", true, false),
792 $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "iltagginggui"), "", "", true, false));
793
794 $lg = $dispatcher->initHeaderAction();
795
796 if(is_object($lg))
797 {
798 // to enable add to desktop / remove from desktop
799 if($this instanceof ilDesktopItemHandling)
800 {
801 $lg->setContainerObject($this);
802 }
803
804 // for activation checks see ilObjectGUI
805 // $lg->enableComments(true);
806 $lg->enableNotes(true);
807 // $lg->enableTags(true);
808 }
809
810 return $lg;
811 }
812 }
813 else
814 {
815 return parent::initHeaderAction();
816 }
817 }
818
822 protected function redrawHeaderAction()
823 {
824 parent::redrawHeaderActionObject();
825 }
826
827 protected function getPermanentLinkWidget($a_append = null, $a_center = false)
828 {
829 if($this->id_type == self::WORKSPACE_NODE_ID)
830 {
831 $a_append .= "_wsp";
832 }
833
834 include_once('Services/PermanentLink/classes/class.ilPermanentLinkGUI.php');
835 $plink = new ilPermanentLinkGUI($this->getType(), $this->node_id , $a_append);
836 $plink->setIncludePermanentLinkText(false);
837 $plink->setAlignCenter($a_center);
838 return $plink->getHTML();
839 }
840
841
842 protected function handleAutoRating(ilObject $a_new_obj)
843 {
844 // only needed in repository
845 if($this->id_type == self::REPOSITORY_NODE_ID)
846 {
847 parent::handleAutoRating($a_new_obj);
848 }
849 }
850}
851
852?>
const PEAR_ERROR_CALLBACK
Definition: PEAR.php:35
$location
Definition: buildRTE.php:44
$_GET["client_id"]
_recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
Class ilCommonActionDispatcherGUI.
Confirmation screen class.
New implementation of ilObjectGUI.
getType()
Functions that must be overwritten.
handleAutoRating(ilObject $a_new_obj)
Activate rating automatically if parent container setting.
create()
Deleted in ilObject.
setTitleAndDescription()
called by prepare output
setTabs()
create tabs (repository/workspace switch)
buildCloneSelect($existing_objs)
fillCloneTemplate($a_tpl_varname, $a_type)
Fill object clone template This method can be called from any object GUI class that wants to offer ob...
deleteConfirmation()
Display delete confirmation form (workspace specific)
getAccessHandler()
Get access handler.
redrawHeaderAction()
Updating icons after ajax call.
& executeCommand()
execute command
__construct($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
Constructor.
omitLocator($a_omit=true)
prepareOutput()
prepare output
getCenterColumnHTML()
Get center column.
getTargetFrame($a_cmd, $a_target_frame="")
get target frame for command (command is method name without "Object", e.g.
showPossibleSubObjects()
show possible subobjects (pulldown menu)
checkPermission($a_perm, $a_cmd="")
initCreationForms($a_new_type)
Init creation froms.
setTargetFrame($a_cmd, $a_target_frame)
set specific target frame for command
deleteConfirmedObjects()
Delete objects (workspace specific)
getPermanentLinkWidget($a_append=null, $a_center=false)
initHeaderAction($a_sub_type=null, $a_sub_id=null)
Add header action menu.
getReturnLocation()
Deprecated functions.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
setColumnSettings($column_gui)
May be overwritten in subclasses.
getRightColumnHTML()
Display right column.
static handleAfterSaveCallback(ilObject $a_obj, $a_callback_ref_id)
After creation callback.
assignObject()
create object instance as internal property (repository/workspace switch)
setCreationMode($a_mode=true)
if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class!...
view()
view object content (repository/workspace switch)
getCreationMode()
get creation mode
setLocator()
set Locator
afterConstructor()
Do anything that should be done after constructor in here.
fillCloneSearchTemplate($a_tpl_varname, $a_type)
putObjectInTree(ilObject $a_obj, $a_parent_node_id=null)
Add object to tree at given position.
addLocatorItems()
Functions to be overwritten.
confirmedDelete()
Delete objects (repository/workspace switch)
withReferences()
Final/Private declaration of unchanged parent methods.
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
static getClassByType($a_obj_type)
Get class by type.
Class ilObjectGUI Basic methods of all Output classes.
Class ilObject Basic functions for all objects.
createReference()
creates reference for object
static _lookupObjectId($a_ref_id)
lookup object id
setPermissions($a_parent_ref)
set permissions of object
getRefId()
get reference id @access public
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
getId()
get object id @access public
putInTree($a_parent_ref)
maybe this method should be in tree object!?
static _lookupType($a_id, $a_reference=false)
lookup object type
Class for permanent links.
Access handler for portfolio.
static add($a_action, $a_ref_id, array $a_diff, $a_source_ref_id=false)
static gatherFaPa($a_ref_id, array $a_role_ids, $a_add_action=false)
const CREATE_OBJECT
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
Access handler for personal workspace.
Tree handler for personal workspace.
$_POST['username']
Definition: cron.php:12
$lg
Definition: example_018.php:62
$params
Definition: example_049.php:96
global $ilCtrl
Definition: ilias.php:18
Interface for gui classes (e.g ilLuceneSearchGUI) that offer add/remove to/from desktop.
$cmd
Definition: sahs_server.php:35
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
global $ilUser
Definition: imgupload.php:15