ILIAS  release_8 Revision v8.24
class.ilADNAbstractGUI.php
Go to the documentation of this file.
1<?php
2
23abstract class ilADNAbstractGUI
24{
25 public const IDENTIFIER = 'identifier';
26
27 protected \ILIAS\DI\UIServices $ui;
28
29 protected \ILIAS\HTTP\Services $http;
30
32 protected \ilADNTabHandling $tab_handling;
33
34 protected ilTabsGUI $tabs;
35
37
38 protected ilCtrl $ctrl;
39
41
42 public ilTree $tree;
43 protected \ilObjAdministrativeNotificationAccess $access;
44
49 {
50 global $DIC;
51
52 $this->tab_handling = $tab_handling;
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}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilADNTabHandling $tab_handling
ILIAS HTTP Services $http
__construct(ilADNTabHandling $tab_handling)
ilADNAbstractGUI constructor.
dispatchCommand(string $cmd)
ilObjAdministrativeNotificationAccess $access
ilGlobalTemplateInterface $tpl
determineCommand(?string $standard=null)
ILIAS DI UIServices $ui
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...
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static http()
Fetches the global http state from ILIAS.