ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilADNAbstractGUI.php
Go to the documentation of this file.
1<?php
2
21
26abstract class ilADNAbstractGUI
27{
28 public const IDENTIFIER = 'identifier';
29
30 protected UIServices $ui;
31
32 protected Services $http;
33
35
36 protected ilTabsGUI $tabs;
37
39
40 protected ilCtrl $ctrl;
41
43
44 public ilTree $tree;
45 protected \ilObjAdministrativeNotificationAccess $access;
46
50 public function __construct(protected \ilADNTabHandling $tab_handling)
51 {
52 global $DIC;
53 $this->tabs = $DIC['ilTabs'];
54 $this->lng = $DIC->language();
55 $this->ctrl = $DIC['ilCtrl'];
56 $this->tpl = $DIC['tpl'];
57 $this->tree = $DIC['tree'];
58 $this->toolbar = $DIC['ilToolbar'];
59 $this->http = $DIC->http();
60 $this->ui = $DIC->ui();
62
63 $this->lng->loadLanguageModule('form');
64 }
65
69 protected function determineCommand(?string $standard = null): ?string
70 {
71 $this->access->checkAccessAndThrowException('visible,read');
72 $cmd = $this->ctrl->getCmd();
73 if ($cmd !== '') {
74 return $cmd;
75 }
76
77 return $standard;
78 }
79
80 abstract protected function dispatchCommand(string $cmd): string;
81
82 public function executeCommand(): void
83 {
84 $next_class = $this->ctrl->getNextClass();
85
86 if ($next_class === '') {
87 $cmd = $this->determineCommand();
88 $this->tpl->setContent($this->dispatchCommand($cmd));
89
90 return;
91 }
92
93 switch ($next_class) {
94 case strtolower(ilADNNotificationGUI::class):
96 $g = new ilADNNotificationGUI($this->tab_handling);
97 $this->ctrl->forwardCommand($g);
98 break;
99 default:
100 break;
101 }
102 }
103}
Provides fluid interface to RBAC services.
Definition: UIServices.php:25
Class Services.
Definition: Services.php:38
Class ilADNAbstractGUI.
dispatchCommand(string $cmd)
ilObjAdministrativeNotificationAccess $access
ilGlobalTemplateInterface $tpl
determineCommand(?string $standard=null)
__construct(protected \ilADNTabHandling $tab_handling)
ilADNAbstractGUI constructor.
Class ilADNNotificationGUI @ilCtrl_IsCalledBy ilADNNotificationGUI: ilObjAdministrativeNotificationGU...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilCtrl provides processing control methods.
language handling
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...
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
static http()
Fetches the global http state from ILIAS.
global $DIC
Definition: shib_login.php:26