ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
ILIAS\Administration\ContactInformationGUI Class Reference

GUI to change the header title of the installation. More...

+ Collaboration diagram for ILIAS\Administration\ContactInformationGUI:

Public Member Functions

 __construct (private ilCtrl $ctrl, private ilGlobalTemplateInterface $tpl, private ilLanguage $lng, private Setting $settings, private bool $has_write_access,)
 
 executeCommand ()
 
 view ()
 
 update ()
 
 buildForm ()
 

Detailed Description

GUI to change the header title of the installation.

@ilCtrl_isCalledBy ILIAS\Administration\ContactInformationGUI: ilObjGeneralSettingsGUI

Definition at line 38 of file ContactInformationGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Administration\ContactInformationGUI::__construct ( private ilCtrl  $ctrl,
private ilGlobalTemplateInterface  $tpl,
private ilLanguage  $lng,
private Setting  $settings,
private bool  $has_write_access 
)

Definition at line 40 of file ContactInformationGUI.php.

46 {
47 }

Member Function Documentation

◆ buildForm()

ILIAS\Administration\ContactInformationGUI::buildForm ( )

Definition at line 95 of file ContactInformationGUI.php.

96 {
97 $form = new ilPropertyFormGUI();
98
99 // first name
100 $ti = new ilTextInputGUI($this->lng->txt("firstname"), "admin_firstname");
101 $ti->setMaxLength(64);
102 $ti->setSize(40);
103 $ti->setRequired(true);
104 $ti->setValue($this->settings->get("admin_firstname"));
105 $form->addItem($ti);
106
107 // last name
108 $ti = new ilTextInputGUI($this->lng->txt("lastname"), "admin_lastname");
109 $ti->setMaxLength(64);
110 $ti->setSize(40);
111 $ti->setRequired(true);
112 $ti->setValue($this->settings->get("admin_lastname"));
113 $form->addItem($ti);
114
115 // title
116 $ti = new ilTextInputGUI($this->lng->txt("title"), "admin_title");
117 $ti->setMaxLength(64);
118 $ti->setSize(40);
119 $ti->setValue($this->settings->get("admin_title"));
120 $form->addItem($ti);
121
122 // position
123 $ti = new ilTextInputGUI($this->lng->txt("position"), "admin_position");
124 $ti->setMaxLength(64);
125 $ti->setSize(40);
126 $ti->setValue($this->settings->get("admin_position"));
127 $form->addItem($ti);
128
129 // institution
130 $ti = new ilTextInputGUI($this->lng->txt("institution"), "admin_institution");
131 $ti->setMaxLength(200);
132 $ti->setSize(40);
133 $ti->setValue($this->settings->get("admin_institution"));
134 $form->addItem($ti);
135
136 // street
137 $ti = new ilTextInputGUI($this->lng->txt("street"), "admin_street");
138 $ti->setMaxLength(64);
139 $ti->setSize(40);
140 //$ti->setRequired(true);
141 $ti->setValue($this->settings->get("admin_street"));
142 $form->addItem($ti);
143
144 // zip code
145 $ti = new ilTextInputGUI($this->lng->txt("zipcode"), "admin_zipcode");
146 $ti->setMaxLength(10);
147 $ti->setSize(5);
148 //$ti->setRequired(true);
149 $ti->setValue($this->settings->get("admin_zipcode"));
150 $form->addItem($ti);
151
152 // city
153 $ti = new ilTextInputGUI($this->lng->txt("city"), "admin_city");
154 $ti->setMaxLength(64);
155 $ti->setSize(40);
156 //$ti->setRequired(true);
157 $ti->setValue($this->settings->get("admin_city"));
158 $form->addItem($ti);
159
160 // country
161 $ti = new ilTextInputGUI($this->lng->txt("country"), "admin_country");
162 $ti->setMaxLength(64);
163 $ti->setSize(40);
164 //$ti->setRequired(true);
165 $ti->setValue($this->settings->get("admin_country"));
166 $form->addItem($ti);
167
168 // phone
169 $ti = new ilTextInputGUI($this->lng->txt("phone"), "admin_phone");
170 $ti->setMaxLength(64);
171 $ti->setSize(40);
172 //$ti->setRequired(true);
173 $ti->setValue($this->settings->get("admin_phone"));
174 $form->addItem($ti);
175
176 // email
177 $ti = new ilEMailInputGUI($this->lng->txt("email"), "admin_email");
178 $ti->setMaxLength(64);
179 $ti->setSize(40);
180 $ti->setRequired(true);
181 $ti->allowRFC822(true);
182 $ti->setValue($this->settings->get("admin_email"));
183 $form->addItem($ti);
184
185 // System support contacts
186 $ti = new ilTextInputGUI($this->lng->txt("adm_support_contacts"), "adm_support_contacts");
187 $ti->setMaxLength(500);
188 $ti->setValue(ilSystemSupportContacts::getList());
189 //$ti->setSize();
190 $ti->setInfo($this->lng->txt("adm_support_contacts_info"));
191 $form->addItem($ti);
192
193 // Accessibility support contacts
194 $ti = new ilTextInputGUI($this->lng->txt("adm_accessibility_contacts"), "accessibility_support_contacts");
195 $ti->setMaxLength(500);
197 //$ti->setSize();
198 $ti->setInfo($this->lng->txt("adm_accessibility_contacts_info"));
199 $form->addItem($ti);
200
201 if ($this->has_write_access) {
202 $form->addCommandButton("update", $this->lng->txt("save"));
203 }
204
205 $form->setTitle($this->lng->txt("contact_data"));
206 $form->setFormAction($this->ctrl->getFormAction($this));
207
208 return $form;
209 }
This class represents a email property in a property form.
This class represents a property form user interface.
This class represents a text property in a property form.

References ILIAS\Repository\ctrl(), ilAccessibilitySupportContacts\getList(), ilSystemSupportContacts\getList(), ILIAS\Repository\lng(), and ILIAS\Repository\settings().

Referenced by ILIAS\Administration\ContactInformationGUI\update(), and ILIAS\Administration\ContactInformationGUI\view().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ILIAS\Administration\ContactInformationGUI::executeCommand ( )

Definition at line 49 of file ContactInformationGUI.php.

50 {
51 $cmd = $this->ctrl->getCmd("view");
52 switch ($cmd) {
53 case 'view':
54 $this->view();
55 break;
56
57 case 'update':
58 if ($this->has_write_access) {
59 $this->$cmd();
60 }
61 break;
62 }
63 }

References ILIAS\Repository\ctrl(), and ILIAS\Administration\ContactInformationGUI\view().

+ Here is the call graph for this function:

◆ update()

ILIAS\Administration\ContactInformationGUI::update ( )

Definition at line 70 of file ContactInformationGUI.php.

70 : void
71 {
72 $form = $this->buildForm();
73 if ($form->checkInput()) {
74 $fs = array("admin_firstname", "admin_lastname", "admin_title", "admin_position",
75 "admin_institution", "admin_street", "admin_zipcode", "admin_city",
76 "admin_country", "admin_phone", "admin_email");
77 foreach ($fs as $f) {
78 $this->settings->set($f, $form->getInput($f));
79 }
80
81 // System support contacts
82 ilSystemSupportContacts::setList($form->getInput("adm_support_contacts"));
83
84 // Accessibility support contacts
85 ilAccessibilitySupportContacts::setList($form->getInput("accessibility_support_contacts"));
86
87 $this->tpl->setOnScreenMessage(GlobalTemplate::MESSAGE_TYPE_SUCCESS, $this->lng->txt("msg_obj_modified"), true);
88 $this->ctrl->redirect($this);
89 } else {
90 $form->setValuesByPost();
91 $this->tpl->setContent($form->getHtml());
92 }
93 }

References Vendor\Package\$f, ILIAS\Administration\ContactInformationGUI\buildForm(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\UICore\GlobalTemplate\MESSAGE_TYPE_SUCCESS, ilSystemSupportContacts\setList(), ilAccessibilitySupportContacts\setList(), and ILIAS\Repository\settings().

+ Here is the call graph for this function:

◆ view()

ILIAS\Administration\ContactInformationGUI::view ( )

Definition at line 65 of file ContactInformationGUI.php.

65 : void
66 {
67 $this->tpl->setContent($this->buildForm()->getHTML());
68 }

References ILIAS\Administration\ContactInformationGUI\buildForm().

Referenced by ILIAS\Administration\ContactInformationGUI\executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: