ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
class.ilObject2GUI.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
24 
43 abstract 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;
56  protected ilTabsGUI $tabs_gui;
60  protected ilObjUser $user;
63  protected Factory $refinery;
67 
68  protected int $request_ref_id;
69  protected int $id_type;
70  protected ?int $parent_id;
71  protected string $type;
72  protected string $html;
73 
74  protected int $object_id;
75  protected ?int $node_id = null;
76  protected array $creation_forms = [];
80  protected $access_handler;
82 
83  public function __construct(int $id = 0, int $id_type = self::REPOSITORY_NODE_ID, int $parent_node_id = 0)
84  {
85  global $DIC;
86 
87  $this->obj_definition = $DIC["objDefinition"];
88  $this->tpl = $DIC["tpl"];
89  $this->ctrl = $DIC["ilCtrl"];
90  $this->lng = $DIC["lng"];
91  $this->tabs_gui = $DIC["ilTabs"];
92  $this->object_service = $DIC->object();
93  $this->favourites = new ilFavouritesManager();
94  $this->error = $DIC['ilErr'];
95  $this->locator = $DIC["ilLocator"];
96  $this->user = $DIC->user();
97  $this->access = $DIC->access();
98  $this->toolbar = $DIC->toolbar();
99  $this->http = $DIC['http'];
100  $this->request = $this->http->request();
101  $this->post_wrapper = $this->http->wrapper()->post();
102  $this->request_wrapper = $this->http->wrapper()->query();
103  $this->refinery = $DIC->refinery();
104  $this->retriever = new ilObjectRequestRetriever($DIC->http()->wrapper(), $this->refinery);
105  $this->rbac_admin = $DIC->rbac()->admin();
106  $this->rbac_system = $DIC->rbac()->system();
107  $this->rbac_review = $DIC->rbac()->review();
108  $this->ui_factory = $DIC['ui.factory'];
109  $this->ui_renderer = $DIC['ui.renderer'];
110  $this->settings = $DIC['ilSetting'];
111  $this->temp_file_system = $DIC->filesystem()->temp();
112 
113  $tree = $DIC["tree"];
114 
115  $this->requested_ref_id = 0;
116  if ($this->request_wrapper->has("ref_id")) {
117  $this->requested_ref_id = $this->request_wrapper->retrieve("ref_id", $this->refinery->kindlyTo()->int());
118  }
119  $this->id_type = $id_type;
120  $this->parent_id = $parent_node_id;
121  $this->type = $this->getType();
122  $this->html = "";
123  $this->notes_service = $DIC->notes();
124 
125  $this->requested_new_type = '';
126  if ($this->request_wrapper->has("new_type")) {
127  $this->requested_new_type = $this->request_wrapper->retrieve(
128  "new_type",
129  $this->refinery->kindlyTo()->string()
130  );
131  } elseif ($this->post_wrapper->has("new_type")) {
132  $this->requested_new_type = $this->post_wrapper->retrieve(
133  "new_type",
134  $this->refinery->kindlyTo()->string()
135  );
136  }
137 
138  $params = [];
139  switch ($this->id_type) {
140  case self::REPOSITORY_NODE_ID:
141  $this->node_id = $id;
142  $this->object_id = ilObject::_lookupObjectId($this->node_id);
143  $this->tree = $tree;
144  $this->access_handler = $this->access;
145  $this->call_by_reference = true; // needed for prepareOutput()
146  $params[] = "ref_id";
147  break;
148 
149  case self::REPOSITORY_OBJECT_ID:
150  $this->object_id = $id;
151  $this->tree = $tree;
152  $this->access_handler = $this->access;
153  $params[] = "obj_id"; // ???
154  break;
155 
156  case self::WORKSPACE_NODE_ID:
157  $ilUser = $DIC["ilUser"];
158  $this->node_id = $id;
159  $this->tree = new ilWorkspaceTree($ilUser->getId());
160  $this->object_id = $this->tree->lookupObjectId($this->node_id);
161  $this->access_handler = new ilWorkspaceAccessHandler($this->tree);
162  $params[] = "wsp_id";
163  break;
164 
165  case self::WORKSPACE_OBJECT_ID:
166  $ilUser = $DIC["ilUser"];
167  $this->object_id = $id;
168  $this->tree = new ilWorkspaceTree($ilUser->getId());
169  $this->access_handler = new ilWorkspaceAccessHandler($this->tree);
170  $params[] = "obj_id"; // ???
171  break;
172 
173  case self::PORTFOLIO_OBJECT_ID:
174  $this->object_id = $id;
175  $this->access_handler = new ilPortfolioAccessHandler();
176  $params[] = "prt_id";
177  break;
178 
179  case self::OBJECT_ID:
180  $this->object_id = $id;
181  $this->access_handler = new ilDummyAccessHandler();
182  $params[] = "obj_id";
183  break;
184  }
185  $this->ctrl->saveParameter($this, $params);
186 
187 
188 
189  // old stuff for legacy code (obsolete?)
190  if (!$this->object_id) {
191  $this->creation_mode = true;
192  }
193  if ($this->node_id) {
194  // add parent node id if missing
195  if (!$this->parent_id && $this->tree) {
196  $this->parent_id = $this->tree->getParentId($this->node_id);
197  }
198  }
199  $this->ref_id = $this->node_id ?? 0;
200  $this->obj_id = $this->object_id;
201 
202  $this->assignObject();
203 
204  // set context
205  if (is_object($this->object)) {
206  $this->ctrl->setContextObject($this->object->getId(), $this->object->getType());
207  }
208 
209  $this->afterConstructor();
210  }
211 
215  protected function afterConstructor(): void
216  {
217  }
218 
222  public function executeCommand(): void
223  {
224  $next_class = $this->ctrl->getNextClass($this);
225  $cmd = $this->ctrl->getCmd();
226 
227  $this->prepareOutput();
228 
229  switch ($next_class) {
230  case "ilworkspaceaccessgui":
231  if ($this->node_id) {
232  $this->tabs_gui->activateTab("id_permissions");
233  $wspacc = new ilWorkspaceAccessGUI($this->node_id, $this->getAccessHandler());
234  $this->ctrl->forwardCommand($wspacc);
235  } else {
236  if (!$cmd) {
237  $cmd = "render";
238  }
239  $this->$cmd();
240  }
241  break;
242 
243  default:
244  if (!$cmd) {
245  $cmd = "render";
246  }
247  $this->$cmd();
248  }
249  }
250 
251  public function getIdType(): int
252  {
253  return $this->id_type;
254  }
255 
259  final protected function assignObject(): void
260  {
261  if ($this->object_id != 0) {
262  switch ($this->id_type) {
263  case self::OBJECT_ID:
264  case self::REPOSITORY_OBJECT_ID:
265  case self::WORKSPACE_OBJECT_ID:
266  case self::PORTFOLIO_OBJECT_ID:
267  $this->object = ilObjectFactory::getInstanceByObjId($this->object_id);
268  break;
269 
270  case self::REPOSITORY_NODE_ID:
271  $this->object = ilObjectFactory::getInstanceByRefId($this->node_id);
272  break;
273 
274  case self::WORKSPACE_NODE_ID:
275  // to be discussed
276  $this->object = ilObjectFactory::getInstanceByObjId($this->object_id);
277  break;
278  }
279  }
280  }
281 
285  protected function getAccessHandler()
286  {
287  return $this->access_handler;
288  }
289 
293  protected function setLocator(): void
294  {
295  if ($this->omit_locator) {
296  return;
297  }
298 
299  switch ($this->id_type) {
300  case self::REPOSITORY_NODE_ID:
301  $ref_id = $this->node_id ?: $this->parent_id;
302  $this->locator->addRepositoryItems($ref_id);
303 
304  // not so nice workaround: todo: handle locator as tabs in ilTemplate
305  if ($this->admin_mode == self::ADMIN_MODE_NONE &&
306  strtolower($this->ctrl->getCmdClass()) == "ilobjrolegui") {
307  $this->ctrl->setParameterByClass(
308  "ilobjrolegui",
309  "rolf_ref_id",
310  $this->request_wrapper->has("rolf_ref_id")
311  ? $this->request_wrapper->retrieve("rolf_ref_id", $this->refinery->kindlyTo()->string())
312  : null
313  );
314  $this->ctrl->setParameterByClass(
315  "ilobjrolegui",
316  "obj_id",
317  $this->request_wrapper->retrieve("obj_id", $this->refinery->kindlyTo()->string())
318  );
319  $this->locator->addItem(
320  $this->lng->txt("role"),
321  $this->ctrl->getLinkTargetByClass(["ilpermissiongui",
322  "ilobjrolegui"], "perm")
323  );
324  }
325 
326  // in workspace this is done in ilPersonalWorkspaceGUI
327  if ($this->object_id) {
328  $this->addLocatorItems();
329  }
330  $this->tpl->setLocator();
331 
332  break;
333 
334  case self::WORKSPACE_NODE_ID:
335  // :TODO:
336  break;
337  }
338  }
339 
343  public function delete(): void
344  {
345  switch ($this->id_type) {
346  case self::REPOSITORY_NODE_ID:
347  case self::REPOSITORY_OBJECT_ID:
348  parent::deleteObject();
349 
350  // no break
351  case self::WORKSPACE_NODE_ID:
352  case self::WORKSPACE_OBJECT_ID:
353  $this->deleteConfirmation();
354 
355  // no break
356  case self::OBJECT_ID:
357  case self::PORTFOLIO_OBJECT_ID:
358  // :TODO: should this ever occur?
359  break;
360  }
361  }
362 
366  public function confirmedDelete(): void
367  {
368  switch ($this->id_type) {
369  case self::REPOSITORY_NODE_ID:
370  case self::REPOSITORY_OBJECT_ID:
371  parent::confirmedDeleteObject();
372 
373  // no break
374  case self::WORKSPACE_NODE_ID:
375  case self::WORKSPACE_OBJECT_ID:
376  $this->deleteConfirmedObjects();
377 
378  // no break
379  case self::OBJECT_ID:
380  case self::PORTFOLIO_OBJECT_ID:
381  // :TODO: should this ever occur?
382  break;
383  }
384  }
385 
390  protected function deleteConfirmedObjects(): void
391  {
392  if (!$this->post_wrapper->has("id")) {
393  $this->tpl->setOnScreenMessage("failure", $this->lng->txt("no_checkbox"), true);
394  $this->ctrl->redirect($this, "");
395  return;
396  }
397 
398  $ids = $this->post_wrapper->retrieve(
399  "id",
400  $this->refinery->kindlyTo()->listOf($this->refinery->kindlyTo()->int())
401  );
402 
403  if (count($ids) == 0) {
404  $this->tpl->setOnScreenMessage("failure", $this->lng->txt("no_checkbox"), true);
405  $this->ctrl->redirect($this, "");
406  return;
407  }
408 
409  // #18797 - because of parent/child relations gather all nodes first
410  $del_nodes = [];
411  foreach ($ids as $node_id) {
412  $del_nodes[$node_id] = $this->tree->getNodeData($node_id);
413  }
414 
415  foreach ($del_nodes as $node_id => $node) {
416  $this->tree->deleteReference($node_id);
417  if ($this->tree->isInTree($node_id)) {
418  $this->tree->deleteTree($node);
419  }
420 
421  $this->getAccessHandler()->removePermission($node_id);
422 
423  $object = ilObjectFactory::getInstanceByObjId((int) $node["obj_id"], false);
424  if ($object) {
425  $object->delete();
426  }
427  }
428 
429  $this->tpl->setOnScreenMessage("success", $this->lng->txt("msg_removed"), true);
430  $this->ctrl->redirect($this, "");
431  }
432 
433  public function getHTML(): string
434  {
435  return parent::getHTML();
436  }
437 
441  final public function withReferences(): bool
442  {
443  return parent::withReferences();
444  }
445  final public function setCreationMode(bool $mode = true): void
446  {
447  parent::setCreationMode($mode);
448  }
449  final public function getCreationMode(): bool
450  {
451  return parent::getCreationMode();
452  }
453  final public function prepareOutput(bool $show_sub_objects = true): bool
454  {
455  return parent::prepareOutput($show_sub_objects);
456  }
457  protected function setTitleAndDescription(): void
458  {
459  parent::setTitleAndDescription();
460  }
461  final protected function omitLocator(bool $omit = true): void
462  {
463  parent::omitLocator($omit);
464  }
465  final protected function getTargetFrame(string $cmd, string $target_frame = ""): string
466  {
467  return parent::getTargetFrame($cmd, $target_frame);
468  }
469  final protected function setTargetFrame(string $cmd, string $target_frame): void
470  {
471  parent::setTargetFrame($cmd, $target_frame);
472  }
473  final public function isVisible(int $ref_id, string $type): bool
474  {
475  return parent::isVisible($ref_id, $type);
476  }
477  final protected function getCenterColumnHTML(): string
478  {
479  return parent::getCenterColumnHTML();
480  }
481  final protected function getRightColumnHTML(): string
482  {
483  return parent::getRightColumnHTML();
484  }
485  final public function setColumnSettings(ilColumnGUI $column_gui): void
486  {
487  parent::setColumnSettings($column_gui);
488  }
489  final protected function checkPermission(
490  string $perm,
491  string $cmd = "",
492  string $type = "",
493  ?int $ref_id = null
494  ): void {
495  parent::checkPermission($perm, $cmd, $type, $ref_id);
496  }
497  final protected function showPossibleSubObjects(): void
498  {
499  parent::showPossibleSubObjects();
500  }
501 
502  final protected function redirectToRefId(int $ref_id, string $cmd = ""): void
503  {
504  parent::redirectToRefId($ref_id, $cmd);
505  }
506 
507  // private function setAdminTabs() { return parent::setAdminTabs(); }
508  // final public function getAdminTabs() { return parent::getAdminTabs(); }
509  final protected function addAdminLocatorItems(bool $do_not_add_object = false): void
510  {
511  parent::addAdminLocatorItems($do_not_add_object);
512  }
513 
517  public function view(): void
518  {
519  switch ($this->id_type) {
520  case self::REPOSITORY_NODE_ID:
521  case self::REPOSITORY_OBJECT_ID:
522  parent::viewObject();
523  break;
524 
525  case self::WORKSPACE_NODE_ID:
526  case self::WORKSPACE_OBJECT_ID:
527  $this->render();
528 
529  // no break
530  case self::OBJECT_ID:
531  case self::PORTFOLIO_OBJECT_ID:
532  // :TODO: should this ever occur? do nothing or edit() ?!
533  break;
534  }
535  }
536 
542  protected function setTabs(): void
543  {
544  switch ($this->id_type) {
545  case self::REPOSITORY_NODE_ID:
546  case self::REPOSITORY_OBJECT_ID:
547  if ($this->checkPermissionBool("edit_permission")) {
548  $this->tabs_gui->addTab(
549  "id_permissions",
550  $this->lng->txt("perm_settings"),
551  $this->ctrl->getLinkTargetByClass([get_class($this), "ilpermissiongui"], "perm")
552  );
553  }
554  break;
555 
556  case self::WORKSPACE_NODE_ID:
557  case self::WORKSPACE_OBJECT_ID:
558  // only files and blogs can be shared for now
559  if (
560  $this->checkPermissionBool("edit_permission") &&
561  in_array($this->type, ["file", "blog"]) &&
563  ) {
564  $this->tabs_gui->addTab(
565  "id_permissions",
566  $this->lng->txt("wsp_permissions"),
567  $this->ctrl->getLinkTargetByClass([get_class($this), "ilworkspaceaccessgui"], "share")
568  );
569  }
570  break;
571  }
572  }
573 
577  // private function setSubObjects($a_sub_objects = "") { die("ilObject2GUI::setSubObjects() is deprecated."); }
578  // final public function getFormAction($a_cmd, $a_formaction = "") { die("ilObject2GUI::getFormAction() is deprecated."); }
579  // final protected function setFormAction($a_cmd, $a_formaction) { die("ilObject2GUI::setFormAction() is deprecated."); }
580  final protected function getReturnLocation(string $cmd, string $location = ""): string
581  {
582  die("ilObject2GUI::getReturnLocation() is deprecated.");
583  }
584  final protected function setReturnLocation(string $cmd, string $location): void
585  {
586  die("ilObject2GUI::setReturnLocation() is deprecated.");
587  }
588  final protected function showActions(): void
589  {
590  die("ilObject2GUI::showActions() is deprecated.");
591  }
592  final protected function getTabs(): void
593  {
594  die("ilObject2GUI::getTabs() is deprecated.");
595  }
596 
600  protected function addLocatorItems(): void
601  {
602  }
603 
607  abstract public function getType(): string;
608 
612  public function create(): void
613  {
614  parent::createObject();
615  }
616  public function save(): void
617  {
618  parent::saveObject();
619  }
620  public function edit(): void
621  {
622  parent::editObject();
623  }
624  public function update(): void
625  {
626  parent::updateObject();
627  }
628  public function cancel(): void
629  {
630  parent::cancelObject();
631  }
632 
636  public function putObjectInTree(ilObject $obj, ?int $parent_node_id = null): void
637  {
638  $this->object_id = $obj->getId();
639 
640  if (!$parent_node_id) {
641  $parent_node_id = $this->parent_id;
642  }
643 
644  // add new object to custom parent container
645  if ($this->retriever->has('crtptrefid')) {
646  $parent_node_id = $this->retriever->getMaybeInt('crtptrefid') ?? 0;
647  }
648 
649  switch ($this->id_type) {
650  case self::REPOSITORY_NODE_ID:
651  case self::REPOSITORY_OBJECT_ID:
652  if (!$this->node_id) {
653  $obj->createReference();
654  $this->node_id = $obj->getRefId();
655  }
656  $obj->putInTree($parent_node_id);
657  $obj->setPermissions($parent_node_id);
658 
659  // rbac log
660  $rbac_log_roles = $this->rbac_review->getParentRoleIds($this->node_id, false);
661  $rbac_log = ilRbacLog::gatherFaPa($this->node_id, array_keys($rbac_log_roles), true);
662  ilRbacLog::add(ilRbacLog::CREATE_OBJECT, $this->node_id, $rbac_log);
663 
664  $this->ctrl->setParameter($this, "ref_id", $this->node_id);
665  break;
666 
667  case self::WORKSPACE_NODE_ID:
668  case self::WORKSPACE_OBJECT_ID:
669  if (!$this->node_id) {
670  $this->node_id = $this->tree->insertObject($parent_node_id, $this->object_id);
671  }
672  $this->getAccessHandler()->setPermissions($parent_node_id, $this->node_id);
673 
674  $this->ctrl->setParameter($this, "wsp_id", $this->node_id);
675  break;
676 
677  case self::OBJECT_ID:
678  case self::PORTFOLIO_OBJECT_ID:
679  // do nothing
680  break;
681  }
682 
683  // BEGIN ChangeEvent: Record save object.
684  ilChangeEvent::_recordWriteEvent($this->object_id, $this->user->getId(), 'create');
685  // END ChangeEvent: Record save object.
686 
687  // use forced callback after object creation
688  self::handleAfterSaveCallback($obj, $this->retriever->getMaybeInt('crtcb'));
689  }
690 
694  public static function handleAfterSaveCallback(ilObject $obj, ?int $callback_ref_id)
695  {
696  global $DIC;
697  $objDefinition = $DIC["objDefinition"];
698 
699  $callback_ref_id = (int) $callback_ref_id;
700  if ($callback_ref_id) {
701  $callback_type = ilObject::_lookupType($callback_ref_id, true);
702  $class_name = "ilObj" . $objDefinition->getClassName($callback_type) . "GUI";
703  if (strtolower($class_name) == "ilobjitemgroupgui") {
704  $callback_obj = new $class_name($callback_ref_id);
705  } else {
706  $callback_obj = new $class_name(null, $callback_ref_id, true, false);
707  }
708  $callback_obj->afterSaveCallback($obj);
709  }
710  }
711 
712  protected function checkPermissionBool(
713  string $perm,
714  string $cmd = "",
715  string $type = "",
716  ?int $node_id = null
717  ): bool {
718  if ($perm == "create") {
719  if (!$node_id) {
720  $node_id = $this->parent_id;
721  }
722  if ($node_id) {
723  return $this->getAccessHandler()->checkAccess($perm . "_" . $type, $cmd, $node_id);
724  }
725  } else {
726  if (!$node_id) {
727  $node_id = $this->node_id;
728  }
729  if ($node_id) {
730  return $this->getAccessHandler()->checkAccess($perm, $cmd, $node_id);
731  }
732  }
733 
734  // if we do not have a node id, check if current user is owner
735  if ($this->obj_id && $this->object->getOwner() == $this->user->getId()) {
736  return true;
737  }
738  return false;
739  }
740 
744  protected function initHeaderAction(?string $sub_type = null, ?int $sub_id = null): ?ilObjectListGUI
745  {
746  if ($this->id_type == self::WORKSPACE_NODE_ID) {
747  if (!$this->creation_mode && $this->object_id) {
748  $dispatcher = new ilCommonActionDispatcherGUI(
750  $this->getAccessHandler(),
751  $this->getType(),
752  $this->node_id,
753  $this->object_id
754  );
755 
756  $dispatcher->setSubObject($sub_type, $sub_id);
757 
759  $this->ctrl->getLinkTarget($this, "redrawHeaderAction", "", true),
760  "",
761  $this->ctrl->getLinkTargetByClass(["ilcommonactiondispatchergui", "iltagginggui"], "")
762  );
763 
764  $lg = $dispatcher->initHeaderAction();
765 
766  if (is_object($lg)) {
767  // to enable add to desktop / remove from desktop
768  if ($this instanceof ilDesktopItemHandling) {
769  $lg->setContainerObject($this);
770  }
771 
772  // for activation checks see ilObjectGUI
773  // $lg->enableComments(true);
774  $lg->enableNotes(true);
775  // $lg->enableTags(true);
776  }
777 
778  return $lg;
779  }
780  }
781 
782  return parent::initHeaderAction($sub_type, $sub_id);
783  }
784 
788  protected function redrawHeaderAction(): void
789  {
790  parent::redrawHeaderActionObject();
791  }
792 }
getReturnLocation(string $cmd, string $location="")
Deprecated functions.
setLocator()
set Locator
delete()
delete object or referenced object (in the case of a referenced object, object data is only deleted i...
ilRbacReview $rbac_review
ilErrorHandling $error
executeCommand()
execute command
view()
view object content (repository/workspace switch)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
New implementation of ilObjectGUI.
$location
Definition: buildRTE.php:22
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:31
ilRbacAdmin $rbac_admin
confirmedDelete()
Delete objects (repository/workspace switch)
ilObjectRequestRetriever $retriever
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
prepareOutput(bool $show_sub_objects=true)
setPermissions(int $parent_ref_id)
ilFavouritesManager $favourites
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilObjectDefinition $obj_definition
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
ilToolbarGUI $toolbar
omitLocator(bool $omit=true)
createReference()
creates reference for object
static gatherFaPa(int $ref_id, array $role_ids, bool $add_action=false)
const CREATE_OBJECT
static http()
Fetches the global http state from ILIAS.
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
getTargetFrame(string $cmd, string $target_frame="")
getType()
Functions that must be overwritten.
Column user interface class.
setCreationMode(bool $mode=true)
Class ilObjectGUI Basic methods of all Output classes.
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
__construct(int $id=0, int $id_type=self::REPOSITORY_NODE_ID, int $parent_node_id=0)
global $DIC
Definition: shib_login.php:26
ilGlobalTemplateInterface $tpl
static _lookupObjectId(int $ref_id)
static _recordWriteEvent(int $obj_id, int $usr_id, string $action, ?int $parent_obj_id=null)
Records a write event.
putObjectInTree(ilObject $obj, ?int $parent_node_id=null)
Add object to tree at given position.
withReferences()
Final/Private declaration of unchanged parent methods.
Base class for all sub item list gui&#39;s.
redrawHeaderAction()
Updating icons after ajax call.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
ACL access handler GUI.
setTabs()
create tabs (repository/workspace switch)
setColumnSettings(ilColumnGUI $column_gui)
static add(int $action, int $ref_id, array $diff, bool $source_ref_id=false)
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
putInTree(int $parent_ref_id)
maybe this method should be in tree object!?
lookupObjectId(int $a_node_id)
Get object id for node id.
redirectToRefId(int $ref_id, string $cmd="")
static handleAfterSaveCallback(ilObject $obj, ?int $callback_ref_id)
After creation callback.
static prepareJsLinks(string $redraw_url, string $notes_url, string $tags_url, ?ilGlobalTemplateInterface $tpl=null)
Insert js/ajax links into template.
Access handler for portfolio NOTE: This file needs to stay in the classes directory, WAC will be confused otherwise.
ilLocatorGUI $locator
deleteConfirmedObjects()
Delete objects (workspace specific) This should probably be moved elsewhere as done with RepUtil...
isVisible(int $ref_id, string $type)
afterConstructor()
Do anything that should be done after constructor in here.
Class ilRbacAdmin Core functions for role based access control.
assignObject()
create object instance as internal property (repository/workspace switch)
setTargetFrame(string $cmd, string $target_frame)
static _lookupType(int $id, bool $reference=false)
addAdminLocatorItems(bool $do_not_add_object=false)
Class ilCommonActionDispatcherGUI.
initHeaderAction(?string $sub_type=null, ?int $sub_id=null)
Add header action menu.
ilRbacSystem $rbac_system
addLocatorItems()
Functions to be overwritten.
setReturnLocation(string $cmd, string $location)
ilAccessHandler $access