ILIAS  trunk Revision v12.0_alpha-424-g0abf7026fd4
class.ilSystemSupportContactsGUI.php
Go to the documentation of this file.
1<?php
2
20
28{
29 protected \ILIAS\DI\UIServices $ui;
33 protected $tpl;
34
38 protected $lng;
39
40 protected $ctrl;
41
45 public function __construct()
46 {
47 global $DIC;
48
49 $ilCtrl = $DIC->ctrl();
50 $tpl = $DIC["tpl"];
51 $lng = $DIC->language();
52
53 $this->ctrl = $ilCtrl;
54 $this->tpl = $tpl;
55 $this->lng = $lng;
56 $this->ui = $DIC->ui();
57 }
58
59
63 public function executeCommand()
64 {
65 $next_class = $this->ctrl->getNextClass($this);
66
67 switch ($next_class) {
68 case strtolower(PublicProfileGUI::class):
69 $gui = new PublicProfileGUI();
70 $this->ctrl->setReturn($this, 'showContacts');
71 $this->ctrl->forwardCommand($gui);
72 break;
73
74 default:
75 $cmd = $this->ctrl->getCmd("showContacts");
76 if (in_array($cmd, array("showContacts"))) {
77 $this->$cmd();
78 }
79 }
80 }
81
85 public function showContacts()
86 {
87 $this->lng->loadLanguageModule("adm");
88 $this->tpl->loadStandardTemplate();
89 $this->tpl->setTitle($this->lng->txt("adm_support_contacts"));
90
91 $html = "";
93 $pgui = new PublicProfileGUI($c);
94 //$pgui->setBackUrl($this->ctrl->getLinkTargetByClass("ilinfoscreengui"));
95 $pgui->setEmbedded(true);
96 $html .= $pgui->getHTML();
97 }
98
99 $f = $this->ui->factory();
100 $r = $this->ui->renderer();
101 $p = $f->panel()->standard(
102 $this->lng->txt("adm_support_contacts"),
103 $f->legacy()->content($html)
104 );
105
106 $this->tpl->setContent($r->render($p));
107 $this->tpl->printToStdout();
108 }
109
110
116 public static function getFooterLink()
117 {
118 global $DIC;
119
120 $ilCtrl = $DIC->ctrl();
121 $ilUser = $DIC->user();
122
124 if (count($users) > 0) {
125 // #17847 - we cannot use a proper GUI on the login screen
126 if (!$ilUser->getId() || $ilUser->getId() == ANONYMOUS_USER_ID) {
129 );
130 } else {
131 return $ilCtrl->getLinkTargetByClass("ilsystemsupportcontactsgui", "");
132 }
133 }
134
135 return "";
136 }
137
143 public static function getFooterText()
144 {
145 global $DIC;
146
147 $lng = $DIC->language();
148 return $lng->txt("contact_sysadmin");
149 }
150}
GUI class for public user profile presentation.
static prepareFormOutput($a_str, bool $a_strip=false)
static getMailsToAddress()
Get mailto: emails.
static getValidSupportContactIds()
Get valid support contacts.
const ANONYMOUS_USER_ID
Definition: constants.php:27
$c
Definition: deliver.php:25
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: shib_login.php:26