ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilBlockGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
29use ILIAS\UI\Component\Panel\Listing\Standard as StandardListingPanel;
30use ILIAS\UI\Component\Panel\Standard as StandardPanel;
31use ILIAS\UI\Component\Panel\Secondary\Listing as SecondaryListingPanel;
32use ILIAS\UI\Component\Panel\Secondary\Legacy as SecondaryLegacyPanel;
33
39abstract class ilBlockGUI
40{
41 public const PRES_MAIN_LEG = 0; // main legacy panel
42 public const PRES_SEC_LEG = 1; // secondary legacy panel
43 public const PRES_SEC_LIST = 2; // secondary list panel
44 public const PRES_MAIN_LIST = 3; // main standard list panel
45 public const PRES_MAIN_TILE = 4; // main standard list panel
46 private int $offset = 0;
47 private int $limit;
48 private bool $enableedit;
49 private string $subtitle;
50 private int $refid;
51 private string $rowtemplatename;
52 private string $rowtemplatedir;
54 private array $modals = [];
56 private array $sort_options = [];
58 private array $presentations = [];
59 private string $activePresentation = '';
60 private string $activeSortOption = '';
61 private string $sort_target = '';
62 protected \ILIAS\UI\Renderer $renderer;
63 protected Factory $factory;
64 protected object $gui_object;
65 protected \ILIAS\Container\Block\StandardGUIRequest $request;
66 protected \ILIAS\Container\Block\BlockManager $block_manager;
67 private \ILIAS\HTTP\GlobalHttpState $http;
68
69 protected bool $repositorymode = false;
70 protected \ILIAS\DI\UIServices $ui;
71 protected array $data = array();
72 protected bool $enablenuminfo = true;
73 protected array $footer_links = array();
74 protected string $block_id = "0";
75 protected bool $allow_moving = true;
76 protected array $move = array("left" => false, "right" => false, "up" => false, "down" => false);
77 protected array $block_commands = array();
78 protected int $max_count = 0;
79 protected bool $close_command = false;
80 protected bool $image = false;
81 protected array $property = [];
82 protected string $nav_value = "";
83 protected string $css_row = "";
84 protected string $title = "";
85 protected bool $admincommands = false;
86 protected array $dropdown;
87 protected ?ilTemplate $tpl;
89 protected ilObjUser $user;
90 protected ilCtrl $ctrl;
92 protected ilLanguage $lng;
94 protected int $presentation;
95 protected ?int $requested_ref_id;
96
97 public function __construct()
98 {
99 global $DIC;
100 $this->factory = $DIC->ui()->factory();
101 $this->renderer = $DIC->ui()->renderer();
102
103 $this->http = $DIC->http();
104 $block_service = new ILIAS\Container\Block\Service($DIC);
105 $this->block_manager = $block_service->internal()
106 ->domain()
107 ->block();
108 $this->request = $block_service->internal()
109 ->gui()
110 ->standardRequest();
111
112
113 // default presentation
114 $this->presentation = self::PRES_SEC_LEG;
115
116 $this->user = $DIC->user();
117 $this->ctrl = $DIC->ctrl();
118 $this->access = $DIC->access();
119 $this->lng = $DIC->language();
120 $this->main_tpl = $DIC["tpl"];
121 $this->obj_def = $DIC["objDefinition"];
122 $this->ui = $DIC->ui();
123
124 $this->main_tpl->addJavaScript("./assets/js/ilblockcallback.js");
125
126 $this->setLimit(25);
127
128 $this->requested_ref_id = $this->request->getRefId();
129 }
130
131 abstract public function getBlockType(): string;
132
136 abstract protected function isRepositoryObject(): bool;
137
138 protected function specialCharsAsEntities(string $string): string
139 {
140 // Should be replaced by a proper refinery transformation once https://github.com/ILIAS-eLearning/ILIAS/pull/6314 is merged
141 return htmlspecialchars(
142 $string,
143 ENT_QUOTES | ENT_SUBSTITUTE,
144 'utf-8'
145 );
146 }
147
148 public function setData(array $a_data): void
149 {
150 $this->data = $a_data;
151 }
152
153 public function getData(): array
154 {
155 return $this->data;
156 }
157
158 public function setPresentation(int $type): void
159 {
160 $this->presentation = $type;
161 }
162
163 public function getPresentation(): int
164 {
165 return $this->presentation;
166 }
167
168 public function setBlockId(string $a_block_id = "0"): void
169 {
170 $this->block_id = $a_block_id;
171 }
172
173 public function getBlockId(): string
174 {
175 return $this->block_id;
176 }
177
183 public function setGuiObject(object $a_gui_object): void
184 {
185 $this->gui_object = $a_gui_object;
186 }
187
188 public function getGuiObject(): object
189 {
190 return $this->gui_object;
191 }
192
193 public function setTitle(string $a_title): void
194 {
195 $this->title = $a_title;
196 }
197
198 public function getTitle(): string
199 {
200 return $this->title;
201 }
202
203 public function setOffset(int $a_offset): void
204 {
205 // see https://github.com/ILIAS-eLearning/ILIAS/pull/6551/files
206 $this->max_count = count($this->getData());
207 if ($this->checkOffset($a_offset)) {
208 $this->offset = $a_offset;
209 } else {
210 throw new ilException("ilBlockGUI::setOffset(): Offset out of range.");
211 }
212 }
213
214 public function getOffset(): int
215 {
216 return $this->offset;
217 }
218
219 public function checkOffset(int $offset): bool
220 {
221 return $offset <= $this->max_count && $offset >= 0;
222 }
223
224 public function setLimit(int $a_limit): void
225 {
226 $this->limit = $a_limit;
227 }
228
229 public function getLimit(): int
230 {
231 return $this->limit;
232 }
233
234 public function setEnableEdit(bool $a_enableedit): void
235 {
236 $this->enableedit = $a_enableedit;
237 }
238
239 public function getEnableEdit(): bool
240 {
241 return $this->enableedit;
242 }
243
244 public function setRepositoryMode(bool $a_repositorymode): void
245 {
246 $this->repositorymode = $a_repositorymode;
247 }
248
249 public function getRepositoryMode(): bool
250 {
252 }
253
254 public function setSubtitle(string $a_subtitle): void
255 {
256 $this->subtitle = $a_subtitle;
257 }
258
259 public function getSubtitle(): string
260 {
261 return $this->subtitle;
262 }
263
267 public function setRefId(int $a_refid): void
268 {
269 $this->refid = $a_refid;
270 }
271
272 public function getRefId(): int
273 {
274 return $this->refid;
275 }
276
277 public function setAdminCommands(bool $a_admincommands): void
278 {
279 $this->admincommands = $a_admincommands;
280 }
281
282 public function getAdminCommands(): bool
283 {
285 }
286
287 public function setEnableNumInfo(bool $a_enablenuminfo): void
288 {
289 $this->enablenuminfo = $a_enablenuminfo;
290 }
291
292 public function getEnableNumInfo(): bool
293 {
295 }
296
301 public function setProperties(array $a_properties): void
302 {
303 $this->property = $a_properties;
304 }
305
306 public function getProperty(string $a_property): ?string
307 {
308 return $this->property[$a_property] ?? null;
309 }
310
311 public function setProperty(string $a_property, string $a_value): void
312 {
313 $this->property[$a_property] = $a_value;
314 }
315
319 public function setRowTemplate(
320 string $a_rowtemplatename,
321 string $a_rowtemplatedir = ""
322 ): void {
323 $this->rowtemplatename = $a_rowtemplatename;
324 $this->rowtemplatedir = $a_rowtemplatedir;
325 }
326
327 final public function getNavParameter(): string
328 {
329 return $this->getBlockType() . "_" . $this->getBlockId() . "_blnav";
330 }
331
332 final public function getConfigParameter(): string
333 {
334 return $this->getBlockType() . "_" . $this->getBlockId() . "_blconf";
335 }
336
337 final public function getMoveParameter(): string
338 {
339 return $this->getBlockType() . "_" . $this->getBlockId() . "_blmove";
340 }
341
342 public function getRowTemplateName(): string
343 {
344 return $this->rowtemplatename;
345 }
346
347 public function getRowTemplateDir(): string
348 {
349 return $this->rowtemplatedir;
350 }
351
352 public function addBlockCommand(string $a_href, string $a_text, string $a_onclick = "", ?RoundTrip $modal = null): void
353 {
354 $this->block_commands[] = [
355 "href" => $a_href,
356 "text" => $a_text,
357 "onclick" => $a_onclick,
358 "modal" => $modal
359 ];
360 }
361
362 public function getBlockCommands(): array
363 {
364 return $this->block_commands;
365 }
366
367 public static function getScreenMode(): string
368 {
369 return IL_SCREEN_SIDE;
370 }
371
372 protected function initCommands(): void
373 {
374 }
375
376 public function getHTML(): string
377 {
378 $this->initCommands();
379
380 $access = $this->access;
381 $panel = null;
382
383 $ctrl = $this->ctrl;
384
385 if ($this->isRepositoryObject()) {
386 if (!$access->checkAccess("read", "", $this->getRefId())) {
387 return "";
388 }
389 }
390
391 $this->addRepoCommands();
392
393 switch ($this->getPresentation()) {
394 case self::PRES_SEC_LEG:
395 $panel = $this->factory->panel()->secondary()->legacy(
396 $this->specialCharsAsEntities($this->getTitle()),
397 $this->factory->legacy()->content($this->getLegacyContent())
398 );
399 break;
400
401 case self::PRES_MAIN_LEG:
402 $panel = $this->factory->panel()->standard(
403 $this->specialCharsAsEntities($this->getTitle()),
404 $this->factory->legacy()->content($this->getLegacyContent())
405 );
406 break;
407
408 case self::PRES_SEC_LIST:
409 $this->handleNavigation();
410 $panel = $this->factory->panel()->secondary()->listing(
411 $this->specialCharsAsEntities($this->getTitle()),
412 $this->getListItemGroups()
413 );
414 break;
415
416 case self::PRES_MAIN_TILE:
417 case self::PRES_MAIN_LIST:
418 $this->handleNavigation();
419 $panel = $this->factory->panel()->listing()->standard(
420 $this->specialCharsAsEntities($this->getTitle()),
421 $this->getListItemGroups()
422 );
423 break;
424 }
425
426 // check for empty list panel
427 if (in_array($this->getPresentation(), [self::PRES_SEC_LIST, self::PRES_MAIN_LIST], true) &&
428 ($panel->getItemGroups() === [] || (count($panel->getItemGroups()) === 1 && $panel->getItemGroups()[0]->getItems() === []))) {
429 if ($this->getPresentation() === self::PRES_SEC_LIST) {
430 $panel = $this->factory->panel()->secondary()->legacy(
431 $this->specialCharsAsEntities($this->getTitle()),
432 $this->factory->legacy()->content($this->getNoItemFoundContent())
433 );
434 } else {
435 $panel = $this->factory->panel()->standard(
436 $this->specialCharsAsEntities($this->getTitle()),
437 $this->factory->legacy()->content($this->getNoItemFoundContent())
438 );
439 }
440 }
441
442 $actions = $this->getActionsForPanel();
443 if ($actions !== null) {
444 $panel = $panel->withActions($actions);
445 }
446 $viewControls = $this->getViewControlsForPanel();
447 if ($viewControls !== [] &&
448 (
449 $panel instanceof StandardPanel ||
450 $panel instanceof SecondaryListingPanel ||
451 $panel instanceof SecondaryLegacyPanel ||
452 $panel instanceof StandardListingPanel
453 )
454 ) {
455 $panel = $panel->withViewControls($viewControls);
456 }
457
458 if ($ctrl->isAsynch()) {
459 $html = $this->renderer->renderAsync([$panel, ...$this->modals]);
460 } else {
461 $html = $this->renderer->render([$panel, ...$this->modals]);
462 }
463
464
465 if ($ctrl->isAsynch()) {
466 $this->send($html);
467 } else {
468 // return incl. wrapping div with id
469 $html = '<div id="' . 'block_' . $this->getBlockType() . '_' . $this->block_id . '">' .
470 $html . '</div>';
471 }
472
473 return $html;
474 }
475
480 protected function preloadData(array $data): void
481 {
482 }
483
488 public function getAsynch(): string
489 {
490 header("Content-type: text/html; charset=UTF-8");
491 return $this->tpl->get();
492 }
493
494
500 protected function getLegacyContent(): string
501 {
502 return "";
503 }
504
511 protected function getListItemForData(array $data): ?\ILIAS\UI\Component\Item\Item
512 {
513 return null;
514 }
515
516
520 protected function handleNavigation(): void
521 {
522 $reg_page = $this->request->getNavPage($this->getNavParameter());
523 if ($reg_page !== "") {
524 $this->nav_value = "::" . ($reg_page * $this->getLimit());
525 }
526
527 if ($this->nav_value == "") {
528 $this->nav_value = $this->block_manager->getNavPar($this->getNavParameter());
529 }
530
531 $this->block_manager->setNavPar(
532 $this->getNavParameter(),
533 $this->nav_value
534 );
535
536 $nav = explode(":", $this->nav_value);
537 if (isset($nav[2])) {
538 $this->setOffset((int) $nav[2]);
539 } else {
540 $this->setOffset(0);
541 }
542 }
543
548 protected function loadData(): array
549 {
550 $data = $this->getData();
551 $this->max_count = count($data);
552 $data = array_slice($data, $this->getOffset(), $this->getLimit(), true);
553 $this->preloadData($data);
554 return $data;
555 }
556
557
563 protected function getListItemGroups(): array
564 {
565 global $DIC;
566 $factory = $DIC->ui()->factory();
567
568 $data = $this->loadData();
569
570 $items = [];
571
572 foreach ($data as $record) {
573 $item = $this->getListItemForData($record);
574 if ($item !== null) {
575 $items[] = $item;
576 }
577 }
578
579 $item_group = $factory->item()->group("", $items);
580
581 return [$item_group];
582 }
583
587 public function getPaginationViewControl(): ?\ILIAS\UI\Component\ViewControl\Pagination
588 {
589 global $DIC;
590 $factory = $DIC->ui()->factory();
591
592 $ilCtrl = $this->ctrl;
593
594 if ($this->max_count <= $this->getLimit()) {
595 return null;
596 }
597
598
599 // $ilCtrl->setParameterByClass("ilcolumngui",
600 // $this->getNavParameter(), "::" . $prevoffset);
601
602 // ajax link
603 $ilCtrl->setParameterByClass(
604 "ilcolumngui",
605 "block_id",
606 "block_" . $this->getBlockType() . "_" . $this->block_id
607 );
608 $block_id = "block_" . $this->getBlockType() . "_" . $this->block_id;
609 $onclick = $ilCtrl->getLinkTargetByClass(
610 "ilcolumngui",
611 "updateBlock",
612 "",
613 true
614 );
615 $ilCtrl->setParameterByClass(
616 "ilcolumngui",
617 "block_id",
618 ""
619 );
620
621 // normal link
622 $href = $ilCtrl->getLinkTargetByClass("ilcolumngui", "", "", false, false);
623
624 //$ilCtrl->setParameterByClass("ilcolumngui",
625 // $this->getNavParameter(), "");
626
627 return $factory->viewControl()->pagination()
628 ->withTargetURL($href, $this->getNavParameter() . "page")
629 ->withTotalEntries($this->max_count)
630 ->withPageSize($this->getLimit())
631 ->withMaxPaginationButtons(1)
632 ->withCurrentPage($this->getOffset() / $this->getLimit());
633 }
634
638 protected function addRepoCommands(): void
639 {
640 $access = $this->access;
642 $ctrl = $this->ctrl;
643 $obj_def = $this->obj_def;
644
645 if ($this->getRepositoryMode() && $this->isRepositoryObject()) {
646 // #10993
647 // @todo: fix this in new presentation somehow
648 /*
649 if ($this->getAdminCommands()) {
650 $this->tpl->setCurrentBlock("block_check");
651 $this->tpl->setVariable("BL_REF_ID", $this->getRefId());
652 $this->tpl->parseCurrentBlock();
653 }*/
654
655 $parent_type = ilObject::_lookupType($this->requested_ref_id, true);
656 $parent_gui = "ilObj" . $obj_def->getClassName($parent_type) . "GUI";
657
658 if ($access->checkAccess("delete", "", $this->getRefId())) {
659 $this->ctrl->setParameterByClass($parent_gui, 'ref_id', $this->requested_ref_id);
660 $this->ctrl->setParameterByClass($parent_gui, 'item_ref_id', $this->getRefId());
661
662 $this->addBlockCommand(
663 $this->ctrl->getLinkTargetByClass($parent_gui, 'delete'),
664 $lng->txt("delete")
665 );
666
667 $this->addBlockCommand(
668 $this->ctrl->getLinkTargetByClass($parent_gui, 'link'),
669 $lng->txt("link")
670 );
671
672 // see ilObjectListGUI::insertCutCommand();
673 $this->addBlockCommand(
674 $this->ctrl->getLinkTargetByClass($parent_gui, 'cut'),
675 $lng->txt("move")
676 );
677
678 $this->ctrl->clearParameterByClass($parent_gui, 'ref_id');
679 $this->ctrl->clearParameterByClass($parent_gui, 'item_ref_id');
680 }
681
682 // #14595 - see ilObjectListGUI::insertCopyCommand()
683 if ($access->checkAccess("copy", "", $this->getRefId())) {
684 $ctrl->setParameterByClass("ilobjectcopygui", "source_id", $this->getRefId());
685 $copy_cmd = $ctrl->getLinkTargetByClass(
686 array("ilrepositorygui", $parent_gui, "ilobjectcopygui"),
687 "initTargetSelection"
688 );
689
690 // see ilObjectListGUI::insertCopyCommand();
691 $this->addBlockCommand(
692 $copy_cmd,
693 $lng->txt("copy")
694 );
695 }
696 }
697 }
698
699 protected function getActionsForPanel(): ?Dropdown
700 {
701 // actions
702 $actions = [];
703 $modals = [];
704
705 foreach ($this->getBlockCommands() as $command) {
706 $href = ($command['onclick'] !== '')
707 ? ''
708 : $command['href'];
709 $button = $this->factory->button()->shy($command['text'], $href);
710 if ($command['onclick']) {
711 $button = $button->withOnLoadCode(function ($id) use ($command) {
712 return
713 "$(\"#$id\").click(function() { ilBlockJSHandler('" . "block_" . $this->getBlockType() . "_" . $this->block_id .
714 "','" . $command["onclick"] . "');});";
715 });
716 }
717
718 if (isset($command['modal']) && $command['modal'] instanceof Modal) {
719 $button = $button->withOnClick($command['modal']->getShowSignal());
720 $this->modals[] = $command['modal'];
721 }
722 $actions[] = $button;
723 }
724
725 if (count($actions) > 0) {
726 $actions = $this->factory->dropdown()->standard($actions)
727 ->withAriaLabel(sprintf(
728 $this->lng->txt('actions_for'),
729 $this->specialCharsAsEntities($this->getTitle())
730 ));
731 return $actions;
732 }
733 return null;
734 }
735
737 public function getViewControlsForPanel(): array
738 {
739 $viewControls = [];
740 if (count($this->presentations) > 1) {
741 $presentation = $this->factory->viewControl()->mode(
742 $this->presentations,
743 'label'
744 )->withActive($this->activePresentation);
745 $viewControls[] = $presentation;
746 }
747
748 if ($this->sort_options !== []) {
749 if (! array_key_exists($this->activeSortOption, $this->sort_options)) {
750 $this->activeSortOption = current(array_keys($this->sort_options));
751 }
752 $sortation = $this->factory->viewControl()->sortation(
753 $this->sort_options,
754 $this->activeSortOption
755 )->withTargetURL(
756 $this->sort_target,
757 'sorting'
758 );
759 $viewControls[] = $sortation;
760 }
761
762 if ($this->getPresentation() === self::PRES_SEC_LIST) {
763 $pg_view_control = $this->getPaginationViewControl();
764 if ($pg_view_control !== null) {
765 $viewControls[] = $pg_view_control;
766 }
767 }
768 return $viewControls;
769 }
770
771 public function sortObject(): string
772 {
773 return $this->getHTML();
774 }
775
776 public function addSortOption(string $option, string $label, bool $active): void
777 {
778 if ($active) {
779 $this->activeSortOption = $option;
780 }
781 $this->sort_options[$option] = $label;
782 }
783
784 public function setSortTarget(string $target): void
785 {
786 $this->sort_target = $target;
787 }
788
789 public function addPresentation(string $label, string $target, bool $active): void
790 {
791 $this->presentations[$label] = $target;
792 if ($active) {
793 $this->activePresentation = $label;
794 }
795 }
796
801 protected function send(string $output): void
802 {
803 $this->http->saveResponse($this->http->response()->withBody(
804 Streams::ofString($output)
805 ));
806 $this->http->sendResponse();
807 $this->http->close();
808 }
809
810 public function getNoItemFoundContent(): string
811 {
812 return $this->lng->txt("no_items");
813 }
814}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
renderer()
factory()
Builds a Color from either hex- or rgb values.
Definition: Factory.php:31
Stream factory which enables the user to create streams without the knowledge of the concrete class.
Definition: Streams.php:32
Definition: UI.php:24
const IL_SCREEN_SIDE
This class represents a block method of a block.
array $block_commands
array $presentations
send(string $output)
Send.
setData(array $a_data)
ilAccessHandler $access
string $rowtemplatedir
ilLanguage $lng
addPresentation(string $label, string $target, bool $active)
Factory $factory
specialCharsAsEntities(string $string)
setTitle(string $a_title)
isRepositoryObject()
Returns whether block has a corresponding repository object.
getAsynch()
Use this for final get before sending asynchronous output (ajax) per echo to output.
string $activeSortOption
setPresentation(int $type)
ilTemplate $tpl
ilObjectDefinition $obj_def
setAdminCommands(bool $a_admincommands)
handleNavigation()
Handle navigation.
getProperty(string $a_property)
preloadData(array $data)
Can be overwritten in subclasses.
static getScreenMode()
const PRES_MAIN_LIST
object $gui_object
setProperties(array $a_properties)
This function is supposed to be used for block type specific properties, that should be inherited thr...
ilGlobalTemplateInterface $main_tpl
loadData()
Load data for current page.
getListItemGroups()
Get items.
setGuiObject(object $a_gui_object)
Set GuiObject.
ILIAS UI Renderer $renderer
string $rowtemplatename
addBlockCommand(string $a_href, string $a_text, string $a_onclick="", ?RoundTrip $modal=null)
addRepoCommands()
Add repo commands.
ilObjUser $user
setRepositoryMode(bool $a_repositorymode)
getLegacyContent()
Get legacy content.
setBlockId(string $a_block_id="0")
checkOffset(int $offset)
string $sort_target
const PRES_MAIN_TILE
setLimit(int $a_limit)
getPaginationViewControl()
Fill previous/next row.
addSortOption(string $option, string $label, bool $active)
ILIAS HTTP GlobalHttpState $http
setProperty(string $a_property, string $a_value)
setOffset(int $a_offset)
ILIAS Container Block StandardGUIRequest $request
getListItemForData(array $data)
Get list item for data array.
setEnableEdit(bool $a_enableedit)
ILIAS DI UIServices $ui
string $activePresentation
setRefId(int $a_refid)
Set Ref Id (only used if isRepositoryObject() is true).
setSubtitle(string $a_subtitle)
ILIAS Container Block BlockManager $block_manager
setEnableNumInfo(bool $a_enablenuminfo)
setSortTarget(string $target)
setRowTemplate(string $a_rowtemplatename, string $a_rowtemplatedir="")
Set Row Template Name.
Class ilCtrl provides processing control methods.
isAsynch()
@inheritDoc
setParameterByClass(string $a_class, string $a_parameter, $a_value)
@inheritDoc
getLinkTargetByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
@inheritDoc
Base class for ILIAS Exception handling.
language handling
User class.
parses the objects.xml it handles the xml-description of all ilias objects
getClassName(string $obj_name)
static _lookupType(int $id, bool $reference=false)
special template class to simplify handling of ITX/PEAR
A component is the most general form of an entity in the UI.
Definition: Component.php:28
This describes commonalities between all types of Dropdowns.
Definition: Dropdown.php:35
This describes a Standard Dropdown.
Definition: Standard.php:27
This describes commonalities between the different modals.
Definition: Modal.php:35
This is how the factory for UI elements looks.
Definition: Factory.php:31
This describes a Pagination Control.
Definition: Pagination.php:33
Interface ilAccessHandler This interface combines all available interfaces which can be called via gl...
checkAccess(string $a_permission, string $a_cmd, int $a_ref_id, string $a_type="", ?int $a_obj_id=null, ?int $a_tree_id=null)
check access for an object (provide $a_type and $a_obj_id if available for better performance)
static http()
Fetches the global http state from ILIAS.
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.
global $lng
Definition: privfeed.php:31
global $DIC
Definition: shib_login.php:26
catch(ilCmiXapiException $e) send($response)
Definition: xapitoken.php:100