ILIAS  release_7 Revision v7.30-3-g800a261c036
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
27abstract class ilObject2GUI extends ilObjectGUI
28{
29 protected $object_id;
30 protected $node_id;
31 protected $creation_forms = array();
32 protected $id_type = array();
33 protected $parent_id;
34 protected $access_handler;
35
36 const OBJECT_ID = 0;
42
50 public function __construct($a_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0)
51 {
52 global $DIC;
53
54 $objDefinition = $DIC["objDefinition"];
55 $tpl = $DIC["tpl"];
56 $ilCtrl = $DIC["ilCtrl"];
57 $ilErr = $DIC["ilErr"];
58 $lng = $DIC["lng"];
59 $ilTabs = $DIC["ilTabs"];
60 $tree = $DIC["tree"];
61 $ilAccess = $DIC["ilAccess"];
62 $this->object_service = $DIC->object();
63 $this->favourites = new ilFavouritesManager();
64
65 if (!isset($ilErr)) {
66 $ilErr = new ilErrorHandling();
67 $ilErr->setErrorHandling(PEAR_ERROR_CALLBACK, array($ilErr,'errorHandler'));
68 } else {
69 $this->ilErr = $ilErr;
70 }
71
72 $this->id_type = $a_id_type;
73 $this->parent_id = $a_parent_node_id;
74 $this->type = $this->getType();
75 $this->html = "";
76
77 $this->tabs_gui = $ilTabs;
78 $this->objDefinition = $objDefinition;
79 $this->tpl = $tpl;
80 $this->ctrl = $ilCtrl;
81 $this->lng = $lng;
82
83 // these are things that are initialised in ilObjectGUI constructor now
84 // and may miss here
85 $this->locator = $DIC["ilLocator"];
86 $this->user = $DIC->user();
87 $this->access = $DIC->access();
88 //$this->settings = $DIC->settings();
89 //$this->rbacreview = $DIC->rbac()->review();
90 $this->toolbar = $DIC->toolbar();
91 $this->request = $DIC->http()->request();
92
93
94 $params = array();
95 switch ($this->id_type) {
97 $this->node_id = $a_id;
98 $this->object_id = ilObject::_lookupObjectId($this->node_id);
99 $this->tree = $tree;
100 $this->access_handler = $ilAccess;
101 $this->call_by_reference = true; // needed for prepareOutput()
102 $params[] = "ref_id";
103 break;
104
106 $this->object_id = $a_id;
107 $this->tree = $tree;
108 $this->access_handler = $ilAccess;
109 $params[] = "obj_id"; // ???
110 break;
111
113 $ilUser = $DIC["ilUser"];
114 $this->node_id = $a_id;
115 include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
116 $this->tree = new ilWorkspaceTree($ilUser->getId());
117 $this->object_id = $this->tree->lookupObjectId($this->node_id);
118 include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
119 $this->access_handler = new ilWorkspaceAccessHandler($this->tree);
120 $params[] = "wsp_id";
121 break;
122
124 $ilUser = $DIC["ilUser"];
125 $this->object_id = $a_id;
126 include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
127 $this->tree = new ilWorkspaceTree($ilUser->getId());
128 include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
129 $this->access_handler = new ilWorkspaceAccessHandler($this->tree);
130 $params[] = "obj_id"; // ???
131 break;
132
134 $this->object_id = $a_id;
135 include_once('./Modules/Portfolio/classes/class.ilPortfolioAccessHandler.php');
136 $this->access_handler = new ilPortfolioAccessHandler();
137 $params[] = "prt_id";
138 break;
139
140 case self::OBJECT_ID:
141 $this->object_id = $a_id;
142 include_once "Services/Object/classes/class.ilDummyAccessHandler.php";
143 $this->access_handler = new ilDummyAccessHandler();
144 $params[] = "obj_id";
145 break;
146 }
147 $this->ctrl->saveParameter($this, $params);
148
149
150
151 // old stuff for legacy code (obsolete?)
152 if (!$this->object_id) {
153 $this->creation_mode = true;
154 }
155 if ($this->node_id) {
156 // add parent node id if missing
157 if (!$this->parent_id && $this->tree) {
158 $this->parent_id = $this->tree->getParentId($this->node_id);
159 }
160 }
161 $this->ref_id = $this->node_id;
162 $this->obj_id = $this->object_id;
163
164
165
166 $this->assignObject();
167
168 // set context
169 if (is_object($this->object)) {
170 $this->ctrl->setContext($this->object->getId(), $this->object->getType());
171 }
172
173 $this->afterConstructor();
174 }
175
179 protected function afterConstructor()
180 {
181 }
182
186 public function executeCommand()
187 {
188 $next_class = $this->ctrl->getNextClass($this);
189 $cmd = $this->ctrl->getCmd();
190
191 $this->prepareOutput();
192
193 switch ($next_class) {
194 case "ilworkspaceaccessgui":
195 if ($this->node_id) {
196 $this->tabs_gui->activateTab("id_permissions");
197
198 include_once('./Services/PersonalWorkspace/classes/class.ilWorkspaceAccessGUI.php');
199 $wspacc = new ilWorkspaceAccessGUI($this->node_id, $this->getAccessHandler());
200 $this->ctrl->forwardCommand($wspacc);
201 break;
202 }
203
204 // no break
205 default:
206 if (!$cmd) {
207 $cmd = "render";
208 }
209 return $this->$cmd();
210 }
211
212 return true;
213 }
214
218 final protected function assignObject()
219 {
220 if ($this->object_id != 0) {
221 switch ($this->id_type) {
222 case self::OBJECT_ID:
226 $this->object = ilObjectFactory::getInstanceByObjId($this->object_id);
227 break;
228
230 $this->object = ilObjectFactory::getInstanceByRefId($this->node_id);
231 break;
232
234 // to be discussed
235 $this->object = ilObjectFactory::getInstanceByObjId($this->object_id);
236 break;
237 }
238 }
239 }
240
246 protected function getAccessHandler()
247 {
249 }
250
254 protected function setLocator()
255 {
256 global $DIC;
257
258 $ilLocator = $DIC["ilLocator"];
259 $tpl = $DIC["tpl"];
260
261 if ($this->omit_locator) {
262 return;
263 }
264
265 switch ($this->id_type) {
267 $ref_id = $this->node_id
268 ? $this->node_id
270 $ilLocator->addRepositoryItems($ref_id);
271
272 // not so nice workaround: todo: handle $ilLocator as tabs in ilTemplate
273 if ($_GET["admin_mode"] == "" &&
274 strtolower($this->ctrl->getCmdClass()) == "ilobjrolegui") {
275 $this->ctrl->setParameterByClass(
276 "ilobjrolegui",
277 "rolf_ref_id",
278 $_GET["rolf_ref_id"]
279 );
280 $this->ctrl->setParameterByClass(
281 "ilobjrolegui",
282 "obj_id",
283 $_GET["obj_id"]
284 );
285 $ilLocator->addItem(
286 $this->lng->txt("role"),
287 $this->ctrl->getLinkTargetByClass(array("ilpermissiongui",
288 "ilobjrolegui"), "perm")
289 );
290 }
291
292 // in workspace this is done in ilPersonalWorkspaceGUI
293 if ($this->object_id) {
294 $this->addLocatorItems();
295 }
296 $tpl->setLocator();
297
298 break;
299
301 // :TODO:
302 break;
303 }
304 }
305
309 public function delete()
310 {
311 switch ($this->id_type) {
314 return parent::deleteObject();
315
318 return $this->deleteConfirmation();
319
320 case self::OBJECT_ID:
322 // :TODO: should this ever occur?
323 break;
324 }
325 }
326
327
331 public function confirmedDelete()
332 {
333 switch ($this->id_type) {
336 return parent::confirmedDeleteObject();
337
340 return $this->deleteConfirmedObjects();
341
342 case self::OBJECT_ID:
344 // :TODO: should this ever occur?
345 break;
346 }
347 }
348
354 protected function deleteConfirmedObjects()
355 {
356 global $DIC;
357
358 $lng = $DIC["lng"];
359
360
361 if (sizeof($_POST["id"])) {
362 // #18797 - because of parent/child relations gather all nodes first
363 $del_nodes = array();
364 foreach ($_POST["id"] as $node_id) {
365 $del_nodes[$node_id] = $this->tree->getNodeData($node_id);
366 }
367
368 foreach ($del_nodes as $node_id => $node) {
369 // tree/reference
370 $this->tree->deleteReference($node_id);
371 if ($this->tree->isInTree($node_id)) {
372 $this->tree->deleteTree($node);
373 }
374
375 // permission
376 $this->getAccessHandler()->removePermission($node_id);
377
378 // object
379 $object = ilObjectFactory::getInstanceByObjId($node["obj_id"], false);
380 if ($object) {
381 $object->delete();
382 }
383 }
384
385 ilUtil::sendSuccess($lng->txt("msg_removed"), true);
386 } else {
387 ilUtil::sendFailure($lng->txt("no_checkbox"), true);
388 }
389
390 $this->ctrl->redirect($this, "");
391 }
392
393 public function getHTML()
394 {
395 return parent::getHTML();
396 }
397
401 final public function withReferences()
402 {
403 return parent::withReferences();
404 }
405 final public function setCreationMode($a_mode = true)
406 {
407 return parent::setCreationMode($a_mode);
408 }
409 final public function getCreationMode()
410 {
411 return parent::getCreationMode();
412 }
413 final public function prepareOutput($a_show_subobjects = true)
414 {
415 return parent::prepareOutput($a_show_subobjects);
416 }
417 protected function setTitleAndDescription()
418 {
419 return parent::setTitleAndDescription();
420 }
421 final protected function showUpperIcon()
422 {
423 return parent::showUpperIcon();
424 }
425 final protected function omitLocator($a_omit = true)
426 {
427 return parent::omitLocator($a_omit);
428 }
429 final protected function getTargetFrame($a_cmd, $a_target_frame = "")
430 {
431 return parent::getTargetFrame($a_cmd, $a_target_frame);
432 }
433 final protected function setTargetFrame($a_cmd, $a_target_frame)
434 {
435 return parent::setTargetFrame($a_cmd, $a_target_frame);
436 }
437 final public function isVisible($a_ref_id, $a_type)
438 {
439 return parent::isVisible($a_ref_id, $a_type);
440 }
441 final protected function getCenterColumnHTML()
442 {
443 return parent::getCenterColumnHTML();
444 }
445 final protected function getRightColumnHTML()
446 {
447 return parent::getRightColumnHTML();
448 }
449 final protected function setColumnSettings(ilColumnGUI $column_gui)
450 {
451 return parent::setColumnSettings($column_gui);
452 }
453 final protected function checkPermission($a_perm, $a_cmd = "", $a_type = "", $a_ref_id = null)
454 {
455 return parent::checkPermission($a_perm, $a_cmd, $a_type, $a_ref_id);
456 }
457
458 // -> ilContainerGUI
459 final protected function showPossibleSubObjects()
460 {
461 return parent::showPossibleSubObjects();
462 }
463 // -> ilRepUtilGUI
464 final public function trash()
465 {
466 return parent::trashObject();
467 } // done
468 // -> ilRepUtil
469 final public function undelete()
470 {
471 return parent::undeleteObject();
472 } // done
473 final public function cancelDelete()
474 {
475 return parent::cancelDeleteObject();
476 } // ok
477 final public function removeFromSystem()
478 {
479 return parent::removeFromSystemObject();
480 } // done
481 final protected function redirectToRefId($a_ref_id, $a_cmd = "")
482 {
483 return parent::redirectToRefId();
484 } // ok
485
486 // -> stefan
487 final protected function fillCloneTemplate($a_tpl_varname, $a_type)
488 {
489 return parent::fillCloneTemplate($a_tpl_varname, $a_type);
490 }
491 final protected function fillCloneSearchTemplate($a_tpl_varname, $a_type)
492 {
493 return parent::fillCloneSearchTemplate($a_tpl_varname, $a_type);
494 }
495 final protected function searchCloneSource()
496 {
497 return parent::searchCloneSourceObject();
498 }
499 final public function cloneAll()
500 {
501 return parent::cloneAllObject();
502 }
503 final protected function buildCloneSelect($existing_objs)
504 {
505 return parent::buildCloneSelect($existing_objs);
506 }
507
508 // -> ilAdministration
509 private function displayList()
510 {
511 return parent::displayList();
512 }
513 // private function setAdminTabs() { return parent::setAdminTabs(); }
514 // final public function getAdminTabs() { return parent::getAdminTabs(); }
515 final protected function addAdminLocatorItems($a_do_not_add_object = false)
516 {
517 return parent::addAdminLocatorItems($a_do_not_add_object);
518 }
519
523 public function view()
524 {
525 switch ($this->id_type) {
528 return parent::viewObject();
529
532 return $this->render();
533
534 case self::OBJECT_ID:
536 // :TODO: should this ever occur? do nothing or edit() ?!
537 break;
538 }
539 }
540
546 protected function setTabs()
547 {
548 global $DIC;
549
550 $ilTabs = $DIC["ilTabs"];
551 $lng = $DIC["lng"];
552
553
554 switch ($this->id_type) {
557 if ($this->checkPermissionBool("edit_permission")) {
558 $ilTabs->addTab(
559 "id_permissions",
560 $lng->txt("perm_settings"),
561 $this->ctrl->getLinkTargetByClass(array(get_class($this), "ilpermissiongui"), "perm")
562 );
563 }
564 break;
565
568 // only files and blogs can be shared for now
569 if ($this->checkPermissionBool("edit_permission") && in_array($this->type, array("file", "blog")) && $this->node_id) {
570 $ilTabs->addTab(
571 "id_permissions",
572 $lng->txt("wsp_permissions"),
573 $this->ctrl->getLinkTargetByClass(array(get_class($this), "ilworkspaceaccessgui"), "share")
574 );
575 }
576 break;
577 }
578 }
579
583 // private function setSubObjects($a_sub_objects = "") { die("ilObject2GUI::setSubObjects() is deprecated."); }
584 // final public function getFormAction($a_cmd, $a_formaction = "") { die("ilObject2GUI::getFormAction() is deprecated."); }
585 // final protected function setFormAction($a_cmd, $a_formaction) { die("ilObject2GUI::setFormAction() is deprecated."); }
586 final protected function getReturnLocation($a_cmd, $a_location = "")
587 {
588 die("ilObject2GUI::getReturnLocation() is deprecated.");
589 }
590 final protected function setReturnLocation($a_cmd, $a_location)
591 {
592 die("ilObject2GUI::setReturnLocation() is deprecated.");
593 }
594 final protected function showActions()
595 {
596 die("ilObject2GUI::showActions() is deprecated.");
597 }
598 final protected function getTabs()
599 {
600 die("ilObject2GUI::getTabs() is deprecated.");
601 }
602 final protected function __showButton($a_cmd, $a_text, $a_target = '')
603 {
604 die("ilObject2GUI::__showButton() is deprecated.");
605 }
606 final protected function hitsperpageObject()
607 {
608 die("ilObject2GUI::hitsperpageObject() is deprecated.");
609 }
610 final protected function &__initTableGUI()
611 {
612 die("ilObject2GUI::__initTableGUI() is deprecated.");
613 }
614 final protected function __setTableGUIBasicData(&$tbl, &$result_set, $a_from = "")
615 {
616 die("ilObject2GUI::__setTableGUIBasicData() is deprecated.");
617 }
618
622 protected function addLocatorItems()
623 {
624 }
625
629 abstract public function getType();
630
634 // private function permObject() { parent::permObject(); }
635 // private function permSaveObject() { parent::permSaveObject(); }
636 // private function infoObject() { parent::infoObject(); }
637 // private function __buildRoleFilterSelect() { parent::__buildRoleFilterSelect(); }
638 // private function __filterRoles() { parent::__filterRoles(); }
639 // private function ownerObject() { parent::ownerObject(); }
640 // private function changeOwnerObject() { parent::changeOwnerObject(); }
641 // private function addRoleObject() { parent::addRoleObject(); }
642 // private function setActions($a_actions = "") { die("ilObject2GUI::setActions() is deprecated."); }
643 // final protected function getActions() { die("ilObject2GUI::getActions() is deprecated."); }
644
648 public function create()
649 {
650 parent::createObject();
651 }
652 public function save()
653 {
654 parent::saveObject();
655 }
656 public function edit()
657 {
658 parent::editObject();
659 }
660 public function update()
661 {
662 parent::updateObject();
663 }
664 public function cancel()
665 {
666 parent::cancelObject();
667 }
668
677 protected function initCreationForms($a_new_type)
678 {
679 $forms = parent::initCreationForms($a_new_type);
680
681 // cloning doesn't work in workspace yet
682 if ($this->id_type == self::WORKSPACE_NODE_ID) {
683 unset($forms[self::CFORM_CLONE]);
684 }
685
686 return $forms;
687 }
688
694 public function importFile()
695 {
696 parent::importFileObject($this->parent_id);
697 }
698
705 public function putObjectInTree(ilObject $a_obj, $a_parent_node_id = null)
706 {
707 global $DIC;
708
709 $rbacreview = $DIC["rbacreview"];
710 $ilUser = $DIC["ilUser"];
711
712
713 $this->object_id = $a_obj->getId();
714
715 if (!$a_parent_node_id) {
716 $a_parent_node_id = $this->parent_id;
717 }
718
719 // add new object to custom parent container
720 if ((int) $_REQUEST["crtptrefid"]) {
721 $a_parent_node_id = (int) $_REQUEST["crtptrefid"];
722 }
723
724 switch ($this->id_type) {
727 if (!$this->node_id) {
728 $a_obj->createReference();
729 $this->node_id = $a_obj->getRefId();
730 }
731 $a_obj->putInTree($a_parent_node_id);
732 $a_obj->setPermissions($a_parent_node_id);
733
734 // rbac log
735 include_once "Services/AccessControl/classes/class.ilRbacLog.php";
736 $rbac_log_roles = $rbacreview->getParentRoleIds($this->node_id, false);
737 $rbac_log = ilRbacLog::gatherFaPa($this->node_id, array_keys($rbac_log_roles), true);
738 ilRbacLog::add(ilRbacLog::CREATE_OBJECT, $this->node_id, $rbac_log);
739
740 $this->ctrl->setParameter($this, "ref_id", $this->node_id);
741 break;
742
745 if (!$this->node_id) {
746 $this->node_id = $this->tree->insertObject($a_parent_node_id, $this->object_id);
747 }
748 $this->getAccessHandler()->setPermissions($a_parent_node_id, $this->node_id);
749
750 $this->ctrl->setParameter($this, "wsp_id", $this->node_id);
751 break;
752
753 case self::OBJECT_ID:
755 // do nothing
756 break;
757 }
758
759 // BEGIN ChangeEvent: Record save object.
760 require_once('Services/Tracking/classes/class.ilChangeEvent.php');
761 ilChangeEvent::_recordWriteEvent($this->object_id, $ilUser->getId(), 'create');
762 // END ChangeEvent: Record save object.
763
764 // use forced callback after object creation
765 self::handleAfterSaveCallback($a_obj, $_REQUEST["crtcb"]);
766 }
767
774 public static function handleAfterSaveCallback(ilObject $a_obj, $a_callback_ref_id)
775 {
776 global $DIC;
777
778 $objDefinition = $DIC["objDefinition"];
779
780
781 $a_callback_ref_id = (int) $a_callback_ref_id;
782 if ($a_callback_ref_id) {
783 $callback_type = ilObject::_lookupType($a_callback_ref_id, true);
784 $class_name = "ilObj" . $objDefinition->getClassName($callback_type) . "GUI";
785 $location = $objDefinition->getLocation($callback_type);
786 include_once($location . "/class." . $class_name . ".php");
787 if (in_array(strtolower($class_name), array("ilobjitemgroupgui"))) {
788 $callback_obj = new $class_name($a_callback_ref_id);
789 } else {
790 $callback_obj = new $class_name(null, $a_callback_ref_id, true, false);
791 }
792 $callback_obj->afterSaveCallback($a_obj);
793 }
794 }
795
805 protected function checkPermissionBool($a_perm, $a_cmd = "", $a_type = "", $a_node_id = null)
806 {
807 global $DIC;
808
809 $ilUser = $DIC["ilUser"];
810
811
812 if ($a_perm == "create") {
813 if (!$a_node_id) {
814 $a_node_id = $this->parent_id;
815 }
816 if ($a_node_id) {
817 return $this->getAccessHandler()->checkAccess($a_perm . "_" . $a_type, $a_cmd, $a_node_id);
818 }
819 } else {
820 if (!$a_node_id) {
821 $a_node_id = $this->node_id;
822 }
823 if ($a_node_id) {
824 return $this->getAccessHandler()->checkAccess($a_perm, $a_cmd, $a_node_id);
825 }
826 }
827
828 // if we do not have a node id, check if current user is owner
829 if ($this->obj_id && $this->object->getOwner() == $ilUser->getId()) {
830 return true;
831 }
832 return false;
833 }
834
842 protected function initHeaderAction($a_sub_type = null, $a_sub_id = null)
843 {
844 if ($this->id_type == self::WORKSPACE_NODE_ID) {
845 if (!$this->creation_mode && $this->object_id) {
846 include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
847 $dispatcher = new ilCommonActionDispatcherGUI(
849 $this->getAccessHandler(),
850 $this->getType(),
851 $this->node_id,
852 $this->object_id
853 );
854
855 $dispatcher->setSubObject($a_sub_type, $a_sub_id);
856
857 include_once "Services/Object/classes/class.ilObjectListGUI.php";
858 ilObjectListGUI::prepareJSLinks(
859 $this->ctrl->getLinkTarget($this, "redrawHeaderAction", "", true),
860 $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "ilnotegui"), "", "", true, false),
861 $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "iltagginggui"), "", "", true, false)
862 );
863
864 $lg = $dispatcher->initHeaderAction();
865
866 if (is_object($lg)) {
867 // to enable add to desktop / remove from desktop
868 if ($this instanceof ilDesktopItemHandling) {
869 $lg->setContainerObject($this);
870 }
871
872 // for activation checks see ilObjectGUI
873 // $lg->enableComments(true);
874 $lg->enableNotes(true);
875 // $lg->enableTags(true);
876 }
877
878 return $lg;
879 }
880 } else {
881 return parent::initHeaderAction($a_sub_type, $a_sub_id);
882 }
883 }
884
888 protected function redrawHeaderAction()
889 {
890 parent::redrawHeaderActionObject();
891 }
892
893 protected function getPermanentLinkWidget($a_append = null, $a_center = false)
894 {
895 if ($this->id_type == self::WORKSPACE_NODE_ID) {
896 $a_append .= "_wsp";
897 }
898
899 include_once('Services/PermanentLink/classes/class.ilPermanentLinkGUI.php');
900 $plink = new ilPermanentLinkGUI($this->getType(), $this->node_id, $a_append);
901 $plink->setIncludePermanentLinkText(false);
902 $plink->setAlignCenter($a_center);
903 return $plink->getHTML();
904 }
905
906
910 protected function handleAutoRating(ilObject $a_new_obj)
911 {
912 // only needed in repository
913 if ($this->id_type == self::REPOSITORY_NODE_ID) {
914 parent::handleAutoRating($a_new_obj);
915 }
916 }
917}
user()
Definition: user.php:4
const PEAR_ERROR_CALLBACK
Definition: PEAR.php:35
$location
Definition: buildRTE.php:44
$_GET["client_id"]
$_POST["username"]
An exception for terminatinating execution or to throw for unit testing.
static _recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
Column user interface class.
Class ilCommonActionDispatcherGUI.
Manages favourites, currently the interface for other components, needs discussion.
New implementation of ilObjectGUI.
getType()
Functions that must be overwritten.
setReturnLocation($a_cmd, $a_location)
set specific return location for command
setColumnSettings(ilColumnGUI $column_gui)
May be overwritten in subclasses.
executeCommand()
execute command
__setTableGUIBasicData(&$tbl, &$result_set, $a_from="")
standard implementation for tables use 'from' variable use different initial setting of table
handleAutoRating(ilObject $a_new_obj)
isVisible($a_ref_id, $a_type)
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...
getReturnLocation($a_cmd, $a_location="")
Deprecated functions.
getAccessHandler()
Get access handler.
redrawHeaderAction()
Updating icons after ajax call.
__showButton($a_cmd, $a_text, $a_target='')
prepareOutput($a_show_subobjects=true)
prepare output
__construct($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
Constructor.
omitLocator($a_omit=true)
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)
initCreationForms($a_new_type)
Init creation froms.
setTargetFrame($a_cmd, $a_target_frame)
set specific target frame for command
deleteConfirmedObjects()
Delete objects (workspace specific)
getTabs()
get tabs abstract method.
getPermanentLinkWidget($a_append=null, $a_center=false)
initHeaderAction($a_sub_type=null, $a_sub_id=null)
Add header action menu.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
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)
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
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.
redirectToRefId($a_ref_id, $a_cmd="")
redirects to (repository) view per ref id usually to a container and usually used at the end of a sav...
addAdminLocatorItems($a_do_not_add_object=false)
should be overwritten to add object specific items (repository items are preloaded)
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
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
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 sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
Access handler for personal workspace.
Tree handler for personal workspace.
global $DIC
Definition: goto.php:24
$ilUser
Definition: imgupload.php:18
Interface for gui classes (e.g ilLuceneSearchGUI) that offer add/remove to/from desktop.