ILIAS  trunk Revision v12.0_alpha-1227-g7ff6d300864
class.ilContactGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
24use ILIAS\Refinery\Factory as Refinery;
28
36{
37 final public const string CONTACTS_VIEW_GALLERY = 'buddy_view_gallery';
38 final public const string CONTACTS_VIEW_TABLE = 'buddy_view_table';
39
40 private readonly \ILIAS\HTTP\GlobalHttpState $http;
43 protected ilLanguage $lng;
45 protected ilHelpGUI $help;
48 protected ilObjUser $user;
51 protected bool $has_sub_tabs = false;
52 protected Refinery $refinery;
53 protected \ILIAS\UI\Factory $ui_factory;
54 protected \ILIAS\UI\Renderer $ui_renderer;
57 private array $view_mode_options = [
58 self::CONTACTS_VIEW_TABLE => self::CONTACTS_VIEW_TABLE,
59 self::CONTACTS_VIEW_GALLERY => self::CONTACTS_VIEW_GALLERY,
60 ];
61
62 public function __construct(
63 string $format_mail_class = ilFormatMail::class,
64 string $relations_table_class = RelationsTable::class
65 ) {
66 global $DIC;
67
68 $this->tpl = $DIC['tpl'];
69 $this->ctrl = $DIC['ilCtrl'];
70 $this->lng = $DIC['lng'];
71 $this->tabs_gui = $DIC['ilTabs'];
72 $this->help = $DIC['ilHelp'];
73 $this->toolbar = $DIC['ilToolbar'];
74 $this->user = $DIC['ilUser'];
75 $this->error = $DIC['ilErr'];
76 $this->rbacsystem = $DIC['rbacsystem'];
77 $this->http = $DIC->http();
78 $this->refinery = $DIC->refinery();
79 $this->ui_factory = $DIC->ui()->factory();
80 $this->ui_renderer = $DIC->ui()->renderer();
81
82 $this->ctrl->saveParameter($this, "mobj_id");
83
84 $this->umail = new $format_mail_class($this->user->getId());
85 $this->relations_table = new $relations_table_class(
86 $this->ui_factory,
87 $this->lng,
88 $DIC->uiService(),
89 $this->http,
90 $this->linkToProfile(...)
91 );
92 $this->lng->loadLanguageModule('buddysystem');
93 }
94
95 public function getUnsafeGetCommands(): array
96 {
97 return [
98 'updateState'
99 ];
100 }
101
102 public function getSafePostCommands(): array
103 {
104 return [];
105 }
106
107 public function executeCommand(): bool
108 {
109 $this->showSubTabs();
110
111 $forward_class = $this->ctrl->getNextClass($this) ?? '';
112
113 $this->umail->persistToStage($this->user->getId(), '', '', '', '', '', null, false);
114
115 switch (strtolower($forward_class)) {
116 case strtolower(ilMailSearchCoursesGUI::class):
117 $this->activateTab('mail_my_courses');
118
119 $this->ctrl->setReturn($this, "showContacts");
120 $this->ctrl->forwardCommand(new ilMailSearchCoursesGUI());
121 break;
122
123 case strtolower(ilMailSearchGroupsGUI::class):
124 $this->activateTab('mail_my_groups');
125
126 $this->ctrl->setReturn($this, "showContacts");
127 $this->ctrl->forwardCommand(new ilMailSearchGroupsGUI());
128 break;
129
130 case strtolower(ilMailingListsGUI::class):
131 $this->activateTab('mail_my_mailing_lists');
132
133 $this->ctrl->setReturn($this, "showContacts");
134 $this->ctrl->forwardCommand(new ilMailingListsGUI());
135 break;
136
137 case strtolower(ilUsersGalleryGUI::class):
138 if (!ilBuddySystem::getInstance()->isEnabled()) {
139 $this->error->raiseError($this->lng->txt('msg_no_perm_read'), $this->error->MESSAGE);
140 }
141
142 $this->tabs_gui->activateSubTab('buddy_view_gallery');
143 $this->activateTab('my_contacts');
144 $this->ctrl->forwardCommand(new ilUsersGalleryGUI(new ilUsersGalleryContacts()));
145 $this->tpl->printToStdout();
146 break;
147
148 case strtolower(PublicProfileGUI::class):
149 $profile_gui = new PublicProfileGUI(
150 $this->http->wrapper()->query()->retrieve('user', $this->refinery->kindlyTo()->int())
151 );
152 $profile_gui->setBackUrl($this->ctrl->getLinkTarget($this, 'showContacts'));
153 $this->ctrl->forwardCommand($profile_gui);
154 $this->tpl->printToStdout();
155 break;
156
157 default:
158 $this->activateTab('mail_my_entries');
159
160 if (!($cmd = $this->ctrl->getCmd())) {
161 if (ilBuddySystem::getInstance()->isEnabled()) {
162 $cmd = 'showContacts';
163 } else {
164 $this->ctrl->redirectByClass(ilMailSearchCoursesGUI::class);
165 }
166 }
167
168 $this->$cmd();
169 break;
170 }
171 return true;
172 }
173
174
175 private function showSubTabs(): void
176 {
177 $galleryCmdClasses = array_map('strtolower', [ilUsersGalleryGUI::class, self::class]);
178 if ($this->tabs_gui->hasTabs()) {
179 if (ilBuddySystem::getInstance()->isEnabled()) {
180 $this->tabs_gui->addSubTab(
181 'my_contacts',
182 $this->lng->txt('my_contacts'),
183 $this->ctrl->getLinkTarget($this)
184 );
185
186 if (in_array(strtolower($this->ctrl->getCmdClass() ?? ''), $galleryCmdClasses, true)) {
187 $mode_options = array_combine(
188 array_map(
189 fn(string $mode): string => $this->lng->txt($mode),
190 array_keys($this->view_mode_options)
191 ),
192 array_map(
193 function (string $mode): string {
194 $this->ctrl->setParameter($this, 'contacts_view', $mode);
195 $url = $this->ctrl->getFormAction($this, 'changeContactsView');
196 $this->ctrl->setParameter($this, 'contacts_view', null);
197
198 return $url;
199 },
200 array_keys($this->view_mode_options)
201 ),
202 );
203
204 $active_mode = strtolower($this->ctrl->getCmdClass() ?? '') === strtolower(ilUsersGalleryGUI::class)
207
208 $sortViewControl = $this->ui_factory
209 ->viewControl()
210 ->mode($mode_options, $this->lng->txt($active_mode))
211 ->withActive($this->lng->txt($active_mode));
212 $this->toolbar->addComponent($sortViewControl);
213 }
214
215 if (
216 count(ilBuddyList::getInstanceByGlobalUser()->getLinkedRelations()) > 0 ||
217 (new ilMailingLists($this->user))->hasAny()
218 ) {
219 $this->tabs_gui->addSubTab(
220 'mail_my_mailing_lists',
221 $this->lng->txt('mail_my_mailing_lists'),
222 $this->ctrl->getLinkTargetByClass(ilMailingListsGUI::class)
223 );
224 }
225 }
226
227 $this->tabs_gui->addSubTab(
228 'mail_my_courses',
229 $this->lng->txt('mail_my_courses'),
230 $this->ctrl->getLinkTargetByClass(ilMailSearchCoursesGUI::class)
231 );
232 $this->tabs_gui->addSubTab(
233 'mail_my_groups',
234 $this->lng->txt('mail_my_groups'),
235 $this->ctrl->getLinkTargetByClass(ilMailSearchGroupsGUI::class)
236 );
237 $this->has_sub_tabs = true;
238 } else {
239 $this->tpl->setTitleIcon(ilUtil::getImagePath('standard/icon_cadm.svg'));
240
241 $this->help->setScreenIdComponent('contacts');
242
243 if (ilBuddySystem::getInstance()->isEnabled()) {
244 $this->tabs_gui->addTab(
245 'my_contacts',
246 $this->lng->txt('my_contacts'),
247 $this->ctrl->getLinkTarget($this)
248 );
249
250 if (in_array(strtolower($this->ctrl->getCmdClass() ?? ''), $galleryCmdClasses, true)) {
251 $this->tabs_gui->addSubTab(
252 'buddy_view_table',
253 $this->lng->txt('buddy_view_table'),
254 $this->ctrl->getLinkTarget($this)
255 );
256 $this->tabs_gui->addSubTab(
257 'buddy_view_gallery',
258 $this->lng->txt('buddy_view_gallery'),
259 $this->ctrl->getLinkTargetByClass(ilUsersGalleryGUI::class)
260 );
261 }
262
263 if (
264 count(ilBuddyList::getInstanceByGlobalUser()->getLinkedRelations()) > 0 ||
265 (new ilMailingLists($this->user))->hasAny()
266 ) {
267 $this->tabs_gui->addTab(
268 'mail_my_mailing_lists',
269 $this->lng->txt('mail_my_mailing_lists'),
270 $this->ctrl->getLinkTargetByClass(ilMailingListsGUI::class)
271 );
272 }
273 }
274
275 $this->tabs_gui->addTab(
276 'mail_my_courses',
277 $this->lng->txt('mail_my_courses'),
278 $this->ctrl->getLinkTargetByClass(ilMailSearchCoursesGUI::class)
279 );
280 $this->tabs_gui->addTab(
281 'mail_my_groups',
282 $this->lng->txt('mail_my_groups'),
283 $this->ctrl->getLinkTargetByClass(ilMailSearchGroupsGUI::class)
284 );
285 }
286 }
287
288 protected function activateTab(string $a_id): void
289 {
290 if ($this->has_sub_tabs) {
291 $this->tabs_gui->activateSubTab($a_id);
292 } else {
293 $this->tabs_gui->activateTab($a_id);
294 }
295 }
296
300 protected function changeContactsView(): void
301 {
302 if (!ilBuddySystem::getInstance()->isEnabled()) {
303 $this->error->raiseError($this->lng->txt('msg_no_perm_read'), $this->error->MESSAGE);
304 }
305
306 $contacts_view = $this->http->wrapper()->query()->retrieve(
307 'contacts_view',
308 $this->refinery->byTrying([
309 $this->refinery->kindlyTo()->string(),
310 $this->refinery->always(self::CONTACTS_VIEW_TABLE)
311 ])
312 );
313
314 switch ($contacts_view) {
316 $this->ctrl->redirectByClass(ilUsersGalleryGUI::class);
317
318 // no break
320 default:
321 $this->ctrl->redirect($this);
322 }
323 }
324
325 protected function showContacts(): void
326 {
327 if (!ilBuddySystem::getInstance()->isEnabled()) {
328 $this->error->raiseError($this->lng->txt('msg_no_perm_read'), $this->error->MESSAGE);
329 }
330
331 $this->tabs_gui->activateSubTab('buddy_view_table');
332 $this->activateTab('my_contacts');
333
334 $content = $this->chatroomInvitationMessage();
335 $action = $this->contactAction();
336 $chat_allowed = (bool) (new ilSetting('chatroom'))->get('chat_enabled', '0');
337 $mail_allowed = $this->rbacsystem->checkAccess(
338 'internal_mail',
340 );
341
342 $content = array_merge($content, $this->relations_table->build(array_merge(
343 $chat_allowed ? ['chat' => $action('standard', 'invite_to_chat', 'inviteToChat')] : [],
344 $mail_allowed ? ['mail' => $action('standard', 'send_mail', 'mailToUsers')] : [],
345 ), $this->ctrl->getLinkTarget($this, 'showContacts'), $action));
346
347 $this->tpl->setContent($this->ui_renderer->render($content));
348 $this->tpl->printToStdout();
349 }
350
351 private function updateState(): void
352 {
353 $get = $this->http->wrapper()->query()->retrieve(...);
354
355 $user_ids = $get('contact_user_ids', $this->refinery->byTrying([
356 $this->refinery->null(),
357 $this->refinery->kindlyTo()->listOf($this->refinery->byTrying([
358 $this->refinery->kindlyTo()->int(),
359 ])),
360 $this->refinery->custom()->transformation(
361 fn($s): array => is_array($s) && join('', $s) === 'ALL_OBJECTS' ?
362 array_column(RelationsTable::data(), 'user_id') :
363 throw new Exception('Nope')
364 ),
365 ]));
366
367 $action = $get('contact_action', $this->refinery->kindlyTo()->string());
368 if (!$user_ids) {
369 $this->tpl->setOnScreenMessage('info', $this->lng->txt('select_one'), true);
370 $this->ctrl->redirect($this);
371 }
372
373 if (in_array($action, ['inviteToChat', 'mailToUsers'], true)) {
374 $this->$action($user_ids);
375 return;
376 }
377
378 if ($action === 'unlink') {
379 $this->ctrl->setParameterByClass(self::class, 'user_id', current($user_ids));
380 $this->ctrl->redirectByClass(self::class, 'confirmUnlinkContact');
381 }
382
383 $this->updateRelationState(current($user_ids), $action);
384 }
385
386 private function confirmUnlinkContact(): void
387 {
388 $this->activateTab('my_contacts');
389 $this->tabs_gui->activateSubTab('buddy_view_table');
390
391 $user_id = $this->http->wrapper()->query()->retrieve('user_id', $this->refinery->kindlyTo()->int());
392
393 $confirmation_gui = new ilConfirmationGUI();
394 $confirmation_gui->setHeaderText($this->lng->txt('buddy_confirm_unlink'));
395 $confirmation_gui->addItem('user_id', (string) $user_id, ilObjUser::_lookupLogin($user_id));
396 $confirmation_gui->setConfirm($this->lng->txt('confirm'), 'unlinkContact');
397 $confirmation_gui->setCancel($this->lng->txt('cancel'), 'showContacts');
398 $confirmation_gui->setFormAction($this->ctrl->getFormActionByClass(self::class, 'showContacts'));
399
400 $this->tpl->setContent($confirmation_gui->getHTML());
401 $this->tpl->printToStdout();
402 }
403
404 private function unlinkContact(): void
405 {
406 $user_id = $this->http->wrapper()->post()->retrieve('user_id', $this->refinery->kindlyTo()->int());
407
408 $this->updateRelationState($user_id, 'unlink');
409 $this->ctrl->redirectByClass(self::class, 'showContacts');
410 }
411
412 private function updateRelationState(int $user, string $action): void
413 {
416 throw new ilBuddySystemException('You cannot perform a state transition for the anonymous user');
417 }
418 if (!$login) {
419 throw new ilBuddySystemException(sprintf(
420 'You cannot perform a state transition for a non existing user (id: %s)',
421 $user
422 ));
423 }
425 $relation = $list->getRelationByUserId($user);
426 if (
427 $relation->isUnlinked() &&
428 !ilUtil::yn2tf((string) ilObjUser::_lookupPref($relation->getBuddyUsrId(), 'bs_allow_to_contact_me'))
429 ) {
430 throw new ilException('The requested user does not want to get contact requests');
431 }
432
433 try {
434 $list->$action($relation);
436 $this->tpl->setOnScreenMessage('failure', sprintf($this->lng->txt($e->getMessage()), $login), true);
437 } catch (Exception) {
438 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('buddy_bs_action_not_possible'), true);
439 }
440
441 $this->ctrl->redirect($this, 'showContacts');
442 }
443
447 protected function mailToUsers(array $usr_ids): void
448 {
449 if (!$this->rbacsystem->checkAccess('internal_mail', ilMailGlobalServices::getMailObjectRefId())) {
450 $this->error->raiseError($this->lng->txt('msg_no_perm_read'), $this->error->MESSAGE);
451 }
452
453 $logins = [];
454 $mail_data = $this->umail->retrieveFromStage();
455 foreach ($usr_ids as $usr_id) {
456 $login = ilObjUser::_lookupLogin($usr_id);
457 if (!$this->umail->existsRecipient($login, (string) $mail_data['rcp_to'])) {
458 $logins[] = $login;
459 }
460 }
461 $logins = array_filter($logins);
462
463 if ($logins !== []) {
464 $mail_data = $this->umail->appendSearchResult($logins, 'to');
465 $this->umail->persistToStage(
466 (int) $mail_data['user_id'],
467 $mail_data['rcp_to'],
468 $mail_data['rcp_cc'],
469 $mail_data['rcp_bcc'],
470 $mail_data['m_subject'],
471 $mail_data['m_message'],
472 $mail_data['attachments'],
473 $mail_data['use_placeholders'],
474 $mail_data['tpl_ctx_id'],
475 $mail_data['tpl_ctx_params']
476 );
477 }
478
479 $this->ctrl->redirectToURL('ilias.php?baseClass=ilMailGUI&type=search_res');
480 }
481
482 public function submitInvitation(): void
483 {
484 try {
485 $usr_ids = $this->http->wrapper()->post()->retrieve('usr_ids', $this->refinery->in()->series([
486 $this->refinery->kindlyTo()->string(),
487 $this->refinery->custom()->transformation(fn(string $s) => explode(',', $s)),
488 $this->refinery->kindlyTo()->listOf($this->refinery->kindlyTo()->int()),
489 $this->refinery->custom()->constraint(fn(array $a) => $a !== [], fn() => 'Empty array.'),
490 ]));
491 } catch (Exception) {
492 $this->tpl->setOnScreenMessage('info', $this->lng->txt('select_one'), true);
493 $this->ctrl->redirect($this);
494 }
495
496 try {
497 $room_id = $this->http->wrapper()->post()->retrieve('room_id', $this->refinery->kindlyTo()->int());
498 } catch (Exception) {
499 $this->tpl->setOnScreenMessage('info', $this->lng->txt('select_one'));
500 $this->inviteToChat($usr_ids);
501 return;
502 }
503
504 $room = ilChatroom::byRoomId($room_id, true);
505
506 $no_access = [];
507 $no_login = [];
508 $valid_users = [];
509 $ref_id = $room->getRefIdByRoomId($room_id);
510
511 foreach ($usr_ids as $usr_id) {
512 $login = ilObjUser::_lookupLogin($usr_id);
513 if ($login === '') {
514 $no_login[] = $usr_id;
515 } elseif (
516 !ilChatroom::checkPermissionsOfUser($usr_id, 'read', $ref_id) ||
517 $room->isUserBanned($usr_id)
518 ) {
519 $no_access[] = $login;
520 } else {
521 $valid_users[] = $usr_id;
522 }
523 }
524
525 $message = join('', [
526 $this->asErrorMessage($no_access, $this->lng->txt('chat_users_without_permission')),
527 $this->asErrorMessage($no_login, $this->lng->txt('chat_users_without_login')),
528 ]);
529
530 if ($message !== '') {
531 $this->tpl->setOnScreenMessage('failure', $message);
532 $this->inviteToChat($usr_ids);
533 return;
534 }
535
536 foreach ($valid_users as $id) {
537 $room->sendInvitationNotification(
538 null,
539 $this->user->getId(),
540 $id,
542 );
543 }
544
545 $this->ctrl->setParameter($this, 'inv_room_ref_id', $ref_id);
546 $this->ctrl->setParameter($this, 'inv_usr_ids', implode(',', $valid_users));
547
548 $this->ctrl->redirect($this);
549 }
550
554 protected function inviteToChat(array $usr_ids): void
555 {
556 $this->tabs_gui->activateSubTab('buddy_view_table');
557 $this->activateTab('my_contacts');
558
559 $this->lng->loadLanguageModule('chatroom');
560
561 $chat_rooms = (new ilChatroom())->getAccessibleRoomIdByTitleMap($this->user->getId());
562
563 $options = array_filter(
564 $chat_rooms,
565 fn(int $room_id) => !(ilChatroom::byRoomId($room_id))->isUserBanned($this->user->getId()),
566 ARRAY_FILTER_USE_KEY
567 );
568
569 asort($options);
570
571 $this->tpl->setTitle($this->lng->txt('mail_invite_users_to_chat'));
572 $this->tpl->setContent($this->inviteToChatForm($options, $usr_ids)->getHTML());
573 $this->tpl->printToStdout();
574 }
575
579 private function asErrorMessage(array $array, string $title): string
580 {
581 if ($array === []) {
582 return '';
583 }
584
585 $items = array_map(
586 fn($s) => '<li>' . htmlspecialchars((string) $s) . '</li>',
587 $array
588 );
589
590 return sprintf(
591 '%s<br><ul>%s</ul>',
592 $title,
593 join('', $items)
594 );
595 }
596
601 private function inviteToChatForm(array $options, array $usr_ids): ilPropertyFormGUI
602 {
603 $form = new ilPropertyFormGUI();
604 $form->setTitle($this->lng->txt('mail_invite_users_to_chat'));
605 $form->addCommandButton('submitInvitation', $this->lng->txt('submit'));
606 $form->addCommandButton('showContacts', $this->lng->txt('cancel'));
607 $form->setFormAction($this->ctrl->getFormAction($this, 'showContacts'));
608
609 $sel = new ilSelectInputGUI($this->lng->txt('chat_select_room'), 'room_id');
610 $sel->setOptions($options);
611 $form->addItem($sel);
612
613 $hidden = new ilHiddenInputGUI('usr_ids');
614 $hidden->setValue(implode(',', $usr_ids));
615 $form->addItem($hidden);
616
617 return $form;
618 }
619
623 private function chatroomInvitationMessage(): array
624 {
625 $has = $this->http->wrapper()->query()->has(...);
626 if (!$has('inv_room_ref_id') || !$has('inv_usr_ids')) {
627 return [];
628 }
629
630 $inv_room_ref_id = $this->http->wrapper()->query()->retrieve(
631 'inv_room_ref_id',
632 $this->refinery->kindlyTo()->int()
633 );
634 $inv_usr_ids = $this->http->wrapper()->query()->retrieve(
635 'inv_usr_ids',
636 $this->refinery->in()->series([
637 $this->refinery->kindlyTo()->string(),
638 $this->refinery->custom()->transformation(fn(string $s): array => explode(',', $s)),
639 $this->refinery->kindlyTo()->listOf($this->refinery->kindlyTo()->int()),
640 $this->refinery->custom()->constraint(fn(array $a): bool => $a !== [], fn(): string => 'Empty array.'),
641 ])
642 );
643
644 $userlist = array_map(ilObjUser::_lookupLogin(...), $inv_usr_ids);
645
646 $url = ilLink::_getStaticLink($inv_room_ref_id, 'chtr');
647
648 return [
649 $this->ui_factory->messageBox()->success(
650 $this->lng->txt('chat_users_have_been_invited') . $this->ui_renderer->render(
651 $this->ui_factory->listing()->unordered($userlist)
652 )
653 )->withButtons([
654 $this->ui_factory->button()->standard($this->lng->txt('goto_invitation_chat'), $url)
655 ])
656 ];
657 }
658
662 private function contactAction(): Closure
663 {
664 $url = new URLBuilder(new URI(rtrim(ILIAS_HTTP_PATH, '/') . '/' . $this->ctrl->getLinkTarget($this, 'updateState')));
665 [$url, $p, $token] = $url->acquireParameters(['contact'], 'action', 'user_ids');
666
667 return fn(string $type, string $lang_var, string $param): Action => $this->ui_factory->table()->action()->$type(
668 $this->lng->txt($lang_var),
669 $url->withParameter($p, $param),
670 $token
671 );
672 }
673
674 private function linkToProfile(int $user, string $label): string
675 {
676 $public_profile = ilObjUser::_lookupPref($user, 'public_profile');
677 if (($this->user->isAnonymous() || $public_profile !== 'y') && $public_profile !== 'g') {
678 return $label;
679 }
680
681 $this->ctrl->setParameterByClass(PublicProfileGUI::class, 'user', (string) $user);
682 $profile_target = $this->ctrl->getLinkTargetByClass(
683 PublicProfileGUI::class,
684 'getHTML'
685 );
686
687 return $this->ui_renderer->render($this->ui_factory->link()->standard($label, $profile_target));
688 }
689}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
$relation
@phpstan-type RelationRecord array{ user_id: int, public_name: string, login: string,...
Builds data types.
Definition: Factory.php:36
The scope of this class is split ilias-conform URI's into components.
Definition: URI.php:35
GUI class for public user profile presentation.
error(string $a_errmsg)
static getInstanceByGlobalUser(?ilObjUser $user=null)
Class ilBuddySystemException.
Class ilChatroom.
static checkPermissionsOfUser(int $usr_id, $permissions, int $ref_id)
Checks user permissions in question for a given user id in relation to a given ref_id.
static byRoomId(int $room_id, bool $initObject=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
mailToUsers(array $usr_ids)
getUnsafeGetCommands()
This method must return a list of unsafe GET commands.
readonly RelationsTable $relations_table
ilFormatMail $umail
ilErrorHandling $error
final const string CONTACTS_VIEW_TABLE
__construct(string $format_mail_class=ilFormatMail::class, string $relations_table_class=RelationsTable::class)
getSafePostCommands()
This method must return a list of safe POST commands.
ILIAS UI Factory $ui_factory
ilCtrlInterface $ctrl
linkToProfile(int $user, string $label)
readonly ILIAS HTTP GlobalHttpState $http
activateTab(string $a_id)
ilGlobalTemplateInterface $tpl
updateRelationState(int $user, string $action)
ilRbacSystem $rbacsystem
inviteToChatForm(array $options, array $usr_ids)
asErrorMessage(array $array, string $title)
ILIAS UI Renderer $ui_renderer
final const string CONTACTS_VIEW_GALLERY
ilToolbarGUI $toolbar
inviteToChat(array $usr_ids)
changeContactsView()
This method is used to switch the contacts view between gallery and table in the mail system.
Error Handling & global info handling.
Base class for ILIAS Exception handling.
Help GUI class.
This class represents a hidden form property in a property form.
language handling
User class.
static _isAnonymous(int $usr_id)
static _lookupPref(int $a_usr_id, string $a_keyword)
static _lookupLogin(int $a_user_id)
This class represents a property form user interface.
class ilRbacSystem system function like checkAccess, addActiveRole ... Supporting system functions ar...
This class represents a selection list property in a property form.
ILIAS Setting Class.
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...
@ilCtrl_Calls ilUsersGalleryGUI: ILIAS\User\Profile\PublicProfileGUI @ilCtrl_isCalledBy ilUsersGaller...
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static yn2tf(string $a_yn)
A component is the most general form of an entity in the UI.
Definition: Component.php:28
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...
$ref_id
Definition: ltiauth.php:66
static http()
Fetches the global http state from ILIAS.
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
global $DIC
Definition: shib_login.php:26
$url
Definition: shib_logout.php:70
$token
Definition: xapitoken.php:67
$param
Definition: xapitoken.php:44