ILIAS  release_8 Revision v8.24
class.ilObject2GUI.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
24
43abstract class ilObject2GUI extends ilObjectGUI
44{
45 public const OBJECT_ID = 0;
46 public const REPOSITORY_NODE_ID = 1;
47 public const WORKSPACE_NODE_ID = 2;
48 public const REPOSITORY_OBJECT_ID = 3;
49 public const WORKSPACE_OBJECT_ID = 4;
50 public const PORTFOLIO_OBJECT_ID = 5;
51
54 protected ilCtrl $ctrl;
55 protected ilLanguage $lng;
61 protected ilObjUser $user;
66 protected Factory $refinery;
70
71 protected int $request_ref_id;
72 protected int $id_type;
73 protected ?int $parent_id;
74 protected string $type;
75 protected string $html;
76
77 protected int $object_id;
78 protected ?int $node_id = null;
79 protected array $creation_forms = array();
83 protected $access_handler;
85
86 public function __construct(int $id = 0, int $id_type = self::REPOSITORY_NODE_ID, int $parent_node_id = 0)
87 {
88 global $DIC;
89
90 $this->obj_definition = $DIC["objDefinition"];
91 $this->tpl = $DIC["tpl"];
92 $this->ctrl = $DIC["ilCtrl"];
93 $this->lng = $DIC["lng"];
94 $this->tabs_gui = $DIC["ilTabs"];
95 $this->object_service = $DIC->object();
96 $this->favourites = new ilFavouritesManager();
97 $this->error = $DIC['ilErr'];
98 $this->locator = $DIC["ilLocator"];
99 $this->user = $DIC->user();
100 $this->access = $DIC->access();
101 $this->toolbar = $DIC->toolbar();
102 $this->post_wrapper = $DIC->http()->wrapper()->post();
103 $this->request_wrapper = $DIC->http()->wrapper()->query();
104 $this->refinery = $DIC->refinery();
105 $this->retriever = new ilObjectRequestRetriever($DIC->http()->wrapper(), $this->refinery);
106 $this->rbac_admin = $DIC->rbac()->admin();
107 $this->rbac_system = $DIC->rbac()->system();
108 $this->rbac_review = $DIC->rbac()->review();
109
110 $tree = $DIC["tree"];
111
112 $this->requested_ref_id = 0;
113 if ($this->request_wrapper->has("ref_id")) {
114 $this->requested_ref_id = $this->request_wrapper->retrieve("ref_id", $this->refinery->kindlyTo()->int());
115 }
116 $this->id_type = $id_type;
117 $this->parent_id = $parent_node_id;
118 $this->type = $this->getType();
119 $this->html = "";
120 $this->notes_service = $DIC->notes();
121
122 $this->requested_new_type = '';
123 if ($this->request_wrapper->has("new_type")) {
124 $this->requested_new_type = $this->request_wrapper->retrieve(
125 "new_type",
126 $this->refinery->kindlyTo()->string()
127 );
128 } elseif ($this->post_wrapper->has("new_type")) {
129 $this->requested_new_type = $this->post_wrapper->retrieve(
130 "new_type",
131 $this->refinery->kindlyTo()->string()
132 );
133 }
134
135 $params = array();
136 switch ($this->id_type) {
138 $this->node_id = $id;
139 $this->object_id = ilObject::_lookupObjectId($this->node_id);
140 $this->tree = $tree;
141 $this->access_handler = $this->access;
142 $this->call_by_reference = true; // needed for prepareOutput()
143 $params[] = "ref_id";
144 break;
145
147 $this->object_id = $id;
148 $this->tree = $tree;
149 $this->access_handler = $this->access;
150 $params[] = "obj_id"; // ???
151 break;
152
154 $ilUser = $DIC["ilUser"];
155 $this->node_id = $id;
156 $this->tree = new ilWorkspaceTree($ilUser->getId());
157 $this->object_id = $this->tree->lookupObjectId($this->node_id);
158 $this->access_handler = new ilWorkspaceAccessHandler($this->tree);
159 $params[] = "wsp_id";
160 break;
161
163 $ilUser = $DIC["ilUser"];
164 $this->object_id = $id;
165 $this->tree = new ilWorkspaceTree($ilUser->getId());
166 $this->access_handler = new ilWorkspaceAccessHandler($this->tree);
167 $params[] = "obj_id"; // ???
168 break;
169
171 $this->object_id = $id;
172 $this->access_handler = new ilPortfolioAccessHandler();
173 $params[] = "prt_id";
174 break;
175
176 case self::OBJECT_ID:
177 $this->object_id = $id;
178 $this->access_handler = new ilDummyAccessHandler();
179 $params[] = "obj_id";
180 break;
181 }
182 $this->ctrl->saveParameter($this, $params);
183
184
185
186 // old stuff for legacy code (obsolete?)
187 if (!$this->object_id) {
188 $this->creation_mode = true;
189 }
190 if ($this->node_id) {
191 // add parent node id if missing
192 if (!$this->parent_id && $this->tree) {
193 $this->parent_id = $this->tree->getParentId($this->node_id);
194 }
195 }
196 $this->ref_id = $this->node_id ?? 0;
197 $this->obj_id = $this->object_id;
198
199 $this->assignObject();
200
201 // set context
202 if (is_object($this->object)) {
203 $this->ctrl->setContextObject($this->object->getId(), $this->object->getType());
204 }
205
206 $this->afterConstructor();
207 }
208
212 protected function afterConstructor(): void
213 {
214 }
215
219 public function executeCommand(): void
220 {
221 $next_class = $this->ctrl->getNextClass($this);
222 $cmd = $this->ctrl->getCmd();
223
224 $this->prepareOutput();
225
226 switch ($next_class) {
227 case "ilworkspaceaccessgui":
228 if ($this->node_id) {
229 $this->tabs_gui->activateTab("id_permissions");
230 $wspacc = new ilWorkspaceAccessGUI($this->node_id, $this->getAccessHandler());
231 $this->ctrl->forwardCommand($wspacc);
232 } else {
233 if (!$cmd) {
234 $cmd = "render";
235 }
236 $this->$cmd();
237 }
238 break;
239
240 default:
241 if (!$cmd) {
242 $cmd = "render";
243 }
244 $this->$cmd();
245 }
246 }
247
248 public function getIdType(): int
249 {
250 return $this->id_type;
251 }
252
256 final protected function assignObject(): void
257 {
258 if ($this->object_id != 0) {
259 switch ($this->id_type) {
260 case self::OBJECT_ID:
264 $this->object = ilObjectFactory::getInstanceByObjId($this->object_id);
265 break;
266
268 $this->object = ilObjectFactory::getInstanceByRefId($this->node_id);
269 break;
270
272 // to be discussed
273 $this->object = ilObjectFactory::getInstanceByObjId($this->object_id);
274 break;
275 }
276 }
277 }
278
282 protected function getAccessHandler()
283 {
285 }
286
290 protected function setLocator(): void
291 {
292 if ($this->omit_locator) {
293 return;
294 }
295
296 switch ($this->id_type) {
298 $ref_id = $this->node_id ?: $this->parent_id;
299 $this->locator->addRepositoryItems($ref_id);
300
301 // not so nice workaround: todo: handle locator as tabs in ilTemplate
302 if ($this->admin_mode == self::ADMIN_MODE_NONE &&
303 strtolower($this->ctrl->getCmdClass()) == "ilobjrolegui") {
304 $this->ctrl->setParameterByClass(
305 "ilobjrolegui",
306 "rolf_ref_id",
307 $this->request_wrapper->has("rolf_ref_id")
308 ? $this->request_wrapper->retrieve("rolf_ref_id", $this->refinery->kindlyTo()->string())
309 : null
310 );
311 $this->ctrl->setParameterByClass(
312 "ilobjrolegui",
313 "obj_id",
314 $this->request_wrapper->retrieve("obj_id", $this->refinery->kindlyTo()->string())
315 );
316 $this->locator->addItem(
317 $this->lng->txt("role"),
318 $this->ctrl->getLinkTargetByClass(array("ilpermissiongui",
319 "ilobjrolegui"), "perm")
320 );
321 }
322
323 // in workspace this is done in ilPersonalWorkspaceGUI
324 if ($this->object_id) {
325 $this->addLocatorItems();
326 }
327 $this->tpl->setLocator();
328
329 break;
330
332 // :TODO:
333 break;
334 }
335 }
336
340 public function delete(): void
341 {
342 switch ($this->id_type) {
345 parent::deleteObject();
346
347 // no break
350 $this->deleteConfirmation();
351
352 // no break
353 case self::OBJECT_ID:
355 // :TODO: should this ever occur?
356 break;
357 }
358 }
359
363 public function confirmedDelete(): void
364 {
365 switch ($this->id_type) {
368 parent::confirmedDeleteObject();
369
370 // no break
373 $this->deleteConfirmedObjects();
374
375 // no break
376 case self::OBJECT_ID:
378 // :TODO: should this ever occur?
379 break;
380 }
381 }
382
387 protected function deleteConfirmedObjects(): void
388 {
389 if (!$this->post_wrapper->has("id")) {
390 $this->tpl->setOnScreenMessage("failure", $this->lng->txt("no_checkbox"), true);
391 $this->ctrl->redirect($this, "");
392 return;
393 }
394
395 $ids = $this->post_wrapper->retrieve(
396 "id",
397 $this->refinery->kindlyTo()->listOf($this->refinery->kindlyTo()->int())
398 );
399
400 if (count($ids) == 0) {
401 $this->tpl->setOnScreenMessage("failure", $this->lng->txt("no_checkbox"), true);
402 $this->ctrl->redirect($this, "");
403 return;
404 }
405
406 // #18797 - because of parent/child relations gather all nodes first
407 $del_nodes = array();
408 foreach ($ids as $node_id) {
409 $del_nodes[$node_id] = $this->tree->getNodeData($node_id);
410 }
411
412 foreach ($del_nodes as $node_id => $node) {
413 $this->tree->deleteReference($node_id);
414 if ($this->tree->isInTree($node_id)) {
415 $this->tree->deleteTree($node);
416 }
417
418 $this->getAccessHandler()->removePermission($node_id);
419
420 $object = ilObjectFactory::getInstanceByObjId((int) $node["obj_id"], false);
421 if ($object) {
422 $object->delete();
423 }
424 }
425
426 $this->tpl->setOnScreenMessage("success", $this->lng->txt("msg_removed"), true);
427 $this->ctrl->redirect($this, "");
428 }
429
430 public function getHTML(): string
431 {
432 return parent::getHTML();
433 }
434
438 final public function withReferences(): bool
439 {
440 return parent::withReferences();
441 }
442 final public function setCreationMode(bool $mode = true): void
443 {
444 parent::setCreationMode($mode);
445 }
446 final public function getCreationMode(): bool
447 {
448 return parent::getCreationMode();
449 }
450 final public function prepareOutput(bool $show_sub_objects = true): bool
451 {
452 return parent::prepareOutput($show_sub_objects);
453 }
454 protected function setTitleAndDescription(): void
455 {
456 parent::setTitleAndDescription();
457 }
458 final protected function omitLocator(bool $omit = true): void
459 {
460 parent::omitLocator($omit);
461 }
462 final protected function getTargetFrame(string $cmd, string $target_frame = ""): string
463 {
464 return parent::getTargetFrame($cmd, $target_frame);
465 }
466 final protected function setTargetFrame(string $cmd, string $target_frame): void
467 {
468 parent::setTargetFrame($cmd, $target_frame);
469 }
470 final public function isVisible(int $ref_id, string $type): bool
471 {
472 return parent::isVisible($ref_id, $type);
473 }
474 final protected function getCenterColumnHTML(): string
475 {
476 return parent::getCenterColumnHTML();
477 }
478 final protected function getRightColumnHTML(): string
479 {
480 return parent::getRightColumnHTML();
481 }
482 final public function setColumnSettings(ilColumnGUI $column_gui): void
483 {
484 parent::setColumnSettings($column_gui);
485 }
486 final protected function checkPermission(
487 string $perm,
488 string $cmd = "",
489 string $type = "",
490 int $ref_id = null
491 ): void {
492 parent::checkPermission($perm, $cmd, $type, $ref_id);
493 }
494 final protected function showPossibleSubObjects(): void
495 {
496 parent::showPossibleSubObjects();
497 }
498 final public function cancelDelete(): void
499 {
500 parent::cancelDeleteObject();
501 }
502 final protected function redirectToRefId(int $ref_id, string $cmd = ""): void
503 {
504 parent::redirectToRefId($ref_id, $cmd);
505 }
506 final protected function fillCloneTemplate(?string $tpl_varname, string $type): ?ilPropertyFormGUI
507 {
508 return parent::fillCloneTemplate($tpl_varname, $type);
509 }
510
511 // private function setAdminTabs() { return parent::setAdminTabs(); }
512 // final public function getAdminTabs() { return parent::getAdminTabs(); }
513 final protected function addAdminLocatorItems(bool $do_not_add_object = false): void
514 {
515 parent::addAdminLocatorItems($do_not_add_object);
516 }
517
521 public function view(): void
522 {
523 switch ($this->id_type) {
524 case self::REPOSITORY_NODE_ID:
525 case self::REPOSITORY_OBJECT_ID:
526 parent::viewObject();
527 break;
528
529 case self::WORKSPACE_NODE_ID:
530 case self::WORKSPACE_OBJECT_ID:
531 $this->render();
532
533 // no break
534 case self::OBJECT_ID:
535 case self::PORTFOLIO_OBJECT_ID:
536 // :TODO: should this ever occur? do nothing or edit() ?!
537 break;
538 }
539 }
540
546 protected function setTabs(): void
547 {
548 switch ($this->id_type) {
549 case self::REPOSITORY_NODE_ID:
550 case self::REPOSITORY_OBJECT_ID:
551 if ($this->checkPermissionBool("edit_permission")) {
552 $this->tabs_gui->addTab(
553 "id_permissions",
554 $this->lng->txt("perm_settings"),
555 $this->ctrl->getLinkTargetByClass(array(get_class($this), "ilpermissiongui"), "perm")
556 );
557 }
558 break;
559
560 case self::WORKSPACE_NODE_ID:
561 case self::WORKSPACE_OBJECT_ID:
562 // only files and blogs can be shared for now
563 if (
564 $this->checkPermissionBool("edit_permission") &&
565 in_array($this->type, array("file", "blog")) &&
566 $this->node_id
567 ) {
568 $this->tabs_gui->addTab(
569 "id_permissions",
570 $this->lng->txt("wsp_permissions"),
571 $this->ctrl->getLinkTargetByClass(array(get_class($this), "ilworkspaceaccessgui"), "share")
572 );
573 }
574 break;
575 }
576 }
577
581 // private function setSubObjects($a_sub_objects = "") { die("ilObject2GUI::setSubObjects() is deprecated."); }
582 // final public function getFormAction($a_cmd, $a_formaction = "") { die("ilObject2GUI::getFormAction() is deprecated."); }
583 // final protected function setFormAction($a_cmd, $a_formaction) { die("ilObject2GUI::setFormAction() is deprecated."); }
584 final protected function getReturnLocation(string $cmd, string $location = ""): string
585 {
586 die("ilObject2GUI::getReturnLocation() is deprecated.");
587 }
588 final protected function setReturnLocation(string $cmd, string $location): void
589 {
590 die("ilObject2GUI::setReturnLocation() is deprecated.");
591 }
592 final protected function showActions(): void
593 {
594 die("ilObject2GUI::showActions() is deprecated.");
595 }
596 final protected function getTabs(): void
597 {
598 die("ilObject2GUI::getTabs() is deprecated.");
599 }
600
604 protected function addLocatorItems(): void
605 {
606 }
607
611 abstract public function getType(): string;
612
616 public function create(): void
617 {
618 parent::createObject();
619 }
620 public function save(): void
621 {
622 parent::saveObject();
623 }
624 public function edit(): void
625 {
626 parent::editObject();
627 }
628 public function update(): void
629 {
630 parent::updateObject();
631 }
632 public function cancel(): void
633 {
634 parent::cancelObject();
635 }
636
642 protected function initCreationForms(string $new_type): array
643 {
644 $forms = parent::initCreationForms($new_type);
645
646 // cloning doesn't work in workspace yet
647 if ($this->id_type == self::WORKSPACE_NODE_ID) {
648 unset($forms[self::CFORM_CLONE]);
649 }
650
651 return $forms;
652 }
653
654 public function importFile(): void
655 {
656 parent::importFileObject($this->parent_id);
657 }
658
662 public function putObjectInTree(ilObject $obj, int $parent_node_id = null): void
663 {
664 $this->object_id = $obj->getId();
665
666 if (!$parent_node_id) {
667 $parent_node_id = $this->parent_id;
668 }
669
670 // add new object to custom parent container
671 if ($this->retriever->has('crtptrefid')) {
672 $parent_node_id = $this->retriever->getMaybeInt('crtptrefid') ?? 0;
673 }
674
675 switch ($this->id_type) {
676 case self::REPOSITORY_NODE_ID:
677 case self::REPOSITORY_OBJECT_ID:
678 if (!$this->node_id) {
679 $obj->createReference();
680 $this->node_id = $obj->getRefId();
681 }
682 $obj->putInTree($parent_node_id);
683 $obj->setPermissions($parent_node_id);
684
685 // rbac log
686 $rbac_log_roles = $this->rbac_review->getParentRoleIds($this->node_id, false);
687 $rbac_log = ilRbacLog::gatherFaPa($this->node_id, array_keys($rbac_log_roles), true);
688 ilRbacLog::add(ilRbacLog::CREATE_OBJECT, $this->node_id, $rbac_log);
689
690 $this->ctrl->setParameter($this, "ref_id", $this->node_id);
691 break;
692
693 case self::WORKSPACE_NODE_ID:
694 case self::WORKSPACE_OBJECT_ID:
695 if (!$this->node_id) {
696 $this->node_id = $this->tree->insertObject($parent_node_id, $this->object_id);
697 }
698 $this->getAccessHandler()->setPermissions($parent_node_id, $this->node_id);
699
700 $this->ctrl->setParameter($this, "wsp_id", $this->node_id);
701 break;
702
703 case self::OBJECT_ID:
704 case self::PORTFOLIO_OBJECT_ID:
705 // do nothing
706 break;
707 }
708
709 // BEGIN ChangeEvent: Record save object.
710 ilChangeEvent::_recordWriteEvent($this->object_id, $this->user->getId(), 'create');
711 // END ChangeEvent: Record save object.
712
713 // use forced callback after object creation
714 self::handleAfterSaveCallback($obj, $this->retriever->getMaybeInt('crtcb'));
715 }
716
720 public static function handleAfterSaveCallback(ilObject $obj, ?int $callback_ref_id)
721 {
722 global $DIC;
723 $objDefinition = $DIC["objDefinition"];
724
725 $callback_ref_id = (int) $callback_ref_id;
726 if ($callback_ref_id) {
727 $callback_type = ilObject::_lookupType($callback_ref_id, true);
728 $class_name = "ilObj" . $objDefinition->getClassName($callback_type) . "GUI";
729 if (strtolower($class_name) == "ilobjitemgroupgui") {
730 $callback_obj = new $class_name($callback_ref_id);
731 } else {
732 $callback_obj = new $class_name(null, $callback_ref_id, true, false);
733 }
734 $callback_obj->afterSaveCallback($obj);
735 }
736 }
737
738 protected function checkPermissionBool(
739 string $perm,
740 string $cmd = "",
741 string $type = "",
742 ?int $node_id = null
743 ): bool {
744 if ($perm == "create") {
745 if (!$node_id) {
746 $node_id = $this->parent_id;
747 }
748 if ($node_id) {
749 return $this->getAccessHandler()->checkAccess($perm . "_" . $type, $cmd, $node_id);
750 }
751 } else {
752 if (!$node_id) {
753 $node_id = $this->node_id;
754 }
755 if ($node_id) {
756 return $this->getAccessHandler()->checkAccess($perm, $cmd, $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() == $this->user->getId()) {
762 return true;
763 }
764 return false;
765 }
766
770 protected function initHeaderAction(?string $sub_type = null, ?int $sub_id = null): ?ilObjectListGUI
771 {
772 if ($this->id_type == self::WORKSPACE_NODE_ID) {
773 if (!$this->creation_mode && $this->object_id) {
774 $dispatcher = new ilCommonActionDispatcherGUI(
776 $this->getAccessHandler(),
777 $this->getType(),
778 $this->node_id,
779 $this->object_id
780 );
781
782 $dispatcher->setSubObject($sub_type, $sub_id);
783
785 $this->ctrl->getLinkTarget($this, "redrawHeaderAction", "", true),
786 "",
787 $this->ctrl->getLinkTargetByClass(["ilcommonactiondispatchergui", "iltagginggui"], "")
788 );
789
790 $lg = $dispatcher->initHeaderAction();
791
792 if (is_object($lg)) {
793 // to enable add to desktop / remove from desktop
794 if ($this instanceof ilDesktopItemHandling) {
795 $lg->setContainerObject($this);
796 }
797
798 // for activation checks see ilObjectGUI
799 // $lg->enableComments(true);
800 $lg->enableNotes(true);
801 // $lg->enableTags(true);
802 }
803
804 return $lg;
805 }
806 }
807
808 return parent::initHeaderAction($sub_type, $sub_id);
809 }
810
814 protected function redrawHeaderAction(): void
815 {
816 parent::redrawHeaderActionObject();
817 }
818
819 protected function getPermanentLinkWidget(string $append = null, bool $center = false): string
820 {
821 if ($this->id_type == self::WORKSPACE_NODE_ID) {
822 $append .= "_wsp";
823 }
824
825 $plink = new ilPermanentLinkGUI($this->getType(), $this->node_id, $append);
826 $plink->setIncludePermanentLinkText(false);
827 return $plink->getHTML();
828 }
829}
$location
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: buildRTE.php:22
Builds data types.
Definition: Factory.php:21
error(string $a_errmsg)
static _recordWriteEvent(int $obj_id, int $usr_id, string $action, ?int $parent_obj_id=null)
Records a write event.
Column user interface class.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilCtrl provides processing control methods.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Error Handling & global info handling uses PEAR error class.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
language handling
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
User class.
New implementation of ilObjectGUI.
getType()
Functions that must be overwritten.
setColumnSettings(ilColumnGUI $column_gui)
ilObjectDefinition $obj_definition
static handleAfterSaveCallback(ilObject $obj, ?int $callback_ref_id)
After creation callback.
executeCommand()
execute command
ilRbacReview $rbac_review
omitLocator(bool $omit=true)
redirectToRefId(int $ref_id, string $cmd="")
redirects to (repository) view per ref id usually to a container and usually used at the end of a sav...
RequestWrapper $request_wrapper
putObjectInTree(ilObject $obj, int $parent_node_id=null)
Add object to tree at given position.
setTabs()
create tabs (repository/workspace switch)
ilAccessHandler $access
redrawHeaderAction()
Updating icons after ajax call.
__construct(int $id=0, int $id_type=self::REPOSITORY_NODE_ID, int $parent_node_id=0)
setTargetFrame(string $cmd, string $target_frame)
Set specific target frame for command.
ilErrorHandling $error
ilObjectRequestRetriever $retriever
initHeaderAction(?string $sub_type=null, ?int $sub_id=null)
Add header action menu.
ilGlobalTemplateInterface $tpl
getCenterColumnHTML()
Get center column.
showPossibleSubObjects()
show possible sub objects (pull down menu)
deleteConfirmedObjects()
Delete objects (workspace specific) This should probably be moved elsewhere as done with RepUtil.
getTabs()
@abstract overwrite in derived GUI class of your object type
setReturnLocation(string $cmd, string $location)
set specific return location for command
setCreationMode(bool $mode=true)
if true, a creation screen is displayed the current [ref_id] don't belong to the current class!...
initCreationForms(string $new_type)
Init creation forms.
getRightColumnHTML()
Display right column.
getTargetFrame(string $cmd, string $target_frame="")
get target frame for command (command is method name without "Object", e.g.
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
addAdminLocatorItems(bool $do_not_add_object=false)
should be overwritten to add object specific items (repository items are preloaded)
assignObject()
create object instance as internal property (repository/workspace switch)
ilRbacAdmin $rbac_admin
ilRbacSystem $rbac_system
view()
view object content (repository/workspace switch)
ilLocatorGUI $locator
setLocator()
set Locator
afterConstructor()
Do anything that should be done after constructor in here.
ilObjectService $object_service
getReturnLocation(string $cmd, string $location="")
Deprecated functions.
ilFavouritesManager $favourites
addLocatorItems()
Functions to be overwritten.
confirmedDelete()
Delete objects (repository/workspace switch)
getPermanentLinkWidget(string $append=null, bool $center=false)
withReferences()
Final/Private declaration of unchanged parent methods.
prepareOutput(bool $show_sub_objects=true)
isVisible(int $ref_id, string $type)
ArrayBasedRequestWrapper $post_wrapper
checkPermission(string $perm, string $cmd="", string $type="", int $ref_id=null)
fillCloneTemplate(?string $tpl_varname, string $type)
Fill object clone template This method can be called from any object GUI class that wants to offer ob...
ilToolbarGUI $toolbar
parses the objects.xml it handles the xml-description of all ilias objects
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
Class ilObjectGUI Basic methods of all Output classes.
static prepareJsLinks(string $redraw_url, string $notes_url, string $tags_url, ilGlobalTemplateInterface $tpl=null)
Insert js/ajax links into template.
Base class for all sub item list gui's.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupObjectId(int $ref_id)
static _lookupType(int $id, bool $reference=false)
setPermissions(int $parent_ref_id)
createReference()
creates reference for object
delete()
delete object or referenced object (in the case of a referenced object, object data is only deleted i...
putInTree(int $parent_ref_id)
maybe this method should be in tree object!?
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Access handler for portfolio NOTE: This file needs to stay in the classes directory,...
This class represents a property form user interface.
Class ilRbacAdmin Core functions for role based access control.
static add(int $a_action, int $a_ref_id, array $a_diff, bool $a_source_ref_id=false)
static gatherFaPa(int $a_ref_id, array $a_role_ids, bool $a_add_action=false)
const CREATE_OBJECT
class ilRbacReview Contains Review functions of core Rbac.
class ilRbacSystem system function like checkAccess, addActiveRole ... Supporting system functions ar...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
if(!file_exists(getcwd() . '/ilias.ini.php'))
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: confirmReg.php:20
global $DIC
Definition: feed.php:28
$ilUser
Definition: imgupload.php:34
Interface RequestWrapper.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$ref_id
Definition: ltiauth.php:67
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:33
$type