ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilChatroomViewGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4require_once 'Modules/Chatroom/classes/class.ilChatroom.php';
5require_once 'Modules/Chatroom/classes/class.ilChatroomUser.php';
6
14{
21 public function joinWithCustomName()
22 {
23 $this->gui->switchToVisibleMode();
24 $this->setupTemplate();
25 $room = ilChatroom::byObjectId($this->gui->object->getId());
26 $chat_user = new ilChatroomUser($this->ilUser, $room);
27 $failure = false;
28 $username = '';
29
30 if ($_REQUEST['custom_username_radio'] == 'custom_username') {
31 $username = $_REQUEST['custom_username_text'];
32 } elseif (method_exists($chat_user, 'build' . $_REQUEST['custom_username_radio'])) {
33 $username = $chat_user->{'build' . $_REQUEST['custom_username_radio']}();
34 } else {
35 $failure = true;
36 }
37
38 if (!$failure && trim($username) != '') {
39 if (!$room->isSubscribed($chat_user->getUserId())) {
40 $chat_user->setUsername($chat_user->buildUniqueUsername($username));
41 }
42
43 $this->showRoom($room, $chat_user);
44 } else {
45 ilUtil::sendFailure($this->ilLng->txt('no_username_given'));
46 $this->showNameSelection($chat_user);
47 }
48 }
49
53 private function setupTemplate()
54 {
55 $this->mainTpl->addJavaScript('Modules/Chatroom/js/chat.js');
56 $this->mainTpl->addJavaScript('Modules/Chatroom/js/iliaschat.jquery.js');
57 $this->mainTpl->addJavaScript('libs/bower/bower_components/jquery-outside-events/jquery.ba-outside-events.min.js');
58
59 $this->mainTpl->addJavaScript('./Services/UIComponent/AdvancedSelectionList/js/AdvancedSelectionList.js');
60
61 $this->mainTpl->addCSS('Modules/Chatroom/templates/default/style.css');
62 }
63
69 private function showRoom(ilChatroom $room, ilChatroomUser $chat_user)
70 {
71 $this->redirectIfNoPermission('read');
72
73 $user_id = $chat_user->getUserId($this->ilUser);
74
75 $this->navigationHistory->addItem($_GET['ref_id'], $this->ilCtrl->getLinkTargetByClass('ilrepositorygui', 'view'), 'chtr');
76
77 if ($room->isUserBanned($user_id)) {
78 $this->cancelJoin($this->ilLng->txt('banned'));
79 return;
80 }
81
82 $scope = $room->getRoomId();
83 $connector = $this->gui->getConnector();
84 $response = @$connector->connect($scope, $user_id);
85
86 if (!$response) {
87 ilUtil::sendFailure($this->ilLng->txt('unable_to_connect'), true);
88 $this->ilCtrl->redirectByClass('ilinfoscreengui', 'info');
89 }
90
91 if (!$room->isSubscribed($chat_user->getUserId())) {
92 $room->connectUser($chat_user);
93 }
94
95 $subScope = 0;
96 $response = $connector->sendEnterPrivateRoom($scope, $subScope, $user_id);
97 if (!$response) {
98 ilUtil::sendFailure($this->ilLng->txt('unable_to_connect'), true);
99 $this->ilCtrl->redirectByClass('ilinfoscreengui', 'info');
100 }
101
102 $connection_info = json_decode($response);
103 $settings = $connector->getSettings();
104 $known_private_room = $room->getActivePrivateRooms($this->ilUser->getId());
105
106 $initial = new stdClass();
107 $initial->users = $room->getConnectedUsers();
108 $initial->private_rooms = array_values($known_private_room);
109 $initial->redirect_url = $this->ilCtrl->getLinkTarget($this->gui, 'view-lostConnection', '', false, false);
110 $initial->profile_image_url = $this->ilCtrl->getLinkTarget($this->gui, 'view-getUserProfileImages', '', true, false);
111 $initial->no_profile_image_url = ilUtil::getImagePath('no_photo_xxsmall.jpg');
112 $initial->private_rooms_enabled = (boolean) $room->getSetting('private_rooms_enabled');
113 $initial->subdirectory = $settings->getSubDirectory();
114
115 $initial->userinfo = array(
116 'moderator' => ilChatroom::checkUserPermissions('moderate', (int) $_GET['ref_id'], false),
117 'id' => $chat_user->getUserId(),
118 'login' => $chat_user->getUsername()
119 );
120
121 $smileys = array();
122
123 include_once('Modules/Chatroom/classes/class.ilChatroomSmilies.php');
124
125 if ($settings->getSmiliesEnabled()) {
126 $smileys_array = ilChatroomSmilies::_getSmilies();
127 foreach ($smileys_array as $smiley_array) {
128 $new_keys = array();
129 $new_val = '';
130 foreach ($smiley_array as $key => $value) {
131 if ($key == 'smiley_keywords') {
132 $new_keys = explode("\n", $value);
133 }
134
135 if ($key == 'smiley_fullpath') {
136 $new_val = $value;
137 }
138 }
139
140 if (!$new_keys || !$new_val) {
141 continue;
142 }
143
144 foreach ($new_keys as $new_key) {
145 $smileys[$new_key] = $new_val;
146 }
147 }
148
149 $initial->smileys = $smileys;
150 } else {
151 $initial->smileys = '{}';
152 }
153
154 $initial->messages = array();
155
156 if (isset($_REQUEST['sub'])) {
157 if ($known_private_room[$_REQUEST['sub']]) {
158 if (!$room->isAllowedToEnterPrivateRoom($chat_user->getUserId(), $_REQUEST['sub'])) {
159 $initial->messages[] = array(
160 'type' => 'error',
161 'message' => $this->ilLng->txt('not_allowed_to_enter'),
162 );
163 } else {
164 $scope = $room->getRoomId();
165 $params = array();
166 $params['user'] = $chat_user->getUserId();
167 $params['sub'] = $_REQUEST['sub'];
168
169 $params['message'] = json_encode(
170 array(
171 'type' => 'private_room_entered',
172 'user' => $user_id
173 )
174 );
175
176 $connector = $this->gui->getConnector();
177 $response = $connector->sendEnterPrivateRoom($scope, $_REQUEST['sub'], $chat_user->getUserId());
178
179 if ($this->isSuccessful($response)) {
180 $room->subscribeUserToPrivateRoom($params['sub'], $params['user']);
181 }
182
183 $initial->enter_room = $_REQUEST['sub'];
184 }
185 } else {
186 $initial->messages[] = array(
187 'type' => 'error',
188 'message' => $this->ilLng->txt('user_invited'),
189 );
190 }
191 }
192
193 if ((int) $room->getSetting('display_past_msgs')) {
194 $initial->messages = array_merge($initial->messages, array_reverse($room->getLastMessages($room->getSetting('display_past_msgs'), $chat_user)));
195 }
196
197 $roomTpl = new ilTemplate('tpl.chatroom.html', true, true, 'Modules/Chatroom');
198 $roomTpl->setVariable('SESSION_ID', $connection_info->{'session-id'});
199 $roomTpl->setVariable('BASEURL', $settings->generateClientUrl());
200 $roomTpl->setVariable('INSTANCE', $settings->getInstance());
201 $roomTpl->setVariable('SCOPE', $scope);
202 $roomTpl->setVariable('MY_ID', $user_id);
203 $roomTpl->setVariable('INITIAL_DATA', json_encode($initial));
204 $roomTpl->setVariable('POSTURL', $this->ilCtrl->getLinkTarget($this->gui, 'postMessage', '', true, true));
205
206 $roomTpl->setVariable('ACTIONS', $this->ilLng->txt('actions'));
207 $roomTpl->setVariable('LBL_CREATE_PRIVATE_ROOM', $this->ilLng->txt('create_private_room_label'));
208 $roomTpl->setVariable('LBL_USER', $this->ilLng->txt('user'));
209 $roomTpl->setVariable('LBL_USER_TEXT', $this->ilLng->txt('invite_username'));
210 $roomTpl->setVariable('LBL_AUTO_SCROLL', $this->ilLng->txt('auto_scroll'));
211
212 $roomTpl->setVariable('INITIAL_USERS', json_encode($room->getConnectedUsers()));
213
214 $this->renderFileUploadForm($roomTpl);
215 $this->renderSendMessageBox($roomTpl);
216 $this->renderLanguageVariables($roomTpl);
217
218 require_once 'Services/UIComponent/Modal/classes/class.ilModalGUI.php';
220
221 $roomRightTpl = new ilTemplate('tpl.chatroom_right.html', true, true, 'Modules/Chatroom');
222 $this->renderRightUsersBlock($roomRightTpl);
223
224 require_once 'Services/UIComponent/Panel/classes/class.ilPanelGUI.php';
225 $right_content_panel = ilPanelGUI::getInstance();
226 $right_content_panel->setHeading($this->ilLng->txt('users'));
227 $right_content_panel->setPanelStyle(ilPanelGUI::PANEL_STYLE_SECONDARY);
228 $right_content_panel->setHeadingStyle(ilPanelGUI::HEADING_STYLE_BLOCK);
229 $right_content_panel->setBody($roomRightTpl->get());
230
231 $this->mainTpl->setContent($roomTpl->get());
232 $this->mainTpl->setRightContent($right_content_panel->getHTML());
233 }
234
239 private function cancelJoin($message)
240 {
242 }
243
248 public function renderFileUploadForm(ilTemplate $roomTpl)
249 {
250 // @todo: Not implemented yet
251 return;
252
253 require_once 'Modules/Chatroom/classes/class.ilChatroomFormFactory.php';
254 $formFactory = new ilChatroomFormFactory();
255 $file_upload = $formFactory->getFileUploadForm();
256 //$file_upload->setFormAction( $ilCtrl->getFormAction($this->gui, 'UploadFile-uploadFile') );
257 $roomTpl->setVariable('FILE_UPLOAD', $file_upload->getHTML());
258 }
259
263 protected function renderSendMessageBox(ilTemplate $roomTpl)
264 {
265 $roomTpl->setVariable('LBL_MESSAGE', $this->ilLng->txt('chat_message'));
266 $roomTpl->setVariable('LBL_TOALL', $this->ilLng->txt('chat_message_to_all'));
267 $roomTpl->setVariable('LBL_OPTIONS', $this->ilLng->txt('chat_message_options'));
268 $roomTpl->setVariable('LBL_DISPLAY', $this->ilLng->txt('chat_message_display'));
269 $roomTpl->setVariable('LBL_SEND', $this->ilLng->txt('send'));
270 }
271
275 protected function renderLanguageVariables(ilTemplate $roomTpl)
276 {
277 $js_translations = array(
278 'LBL_MAINROOM' => 'chat_mainroom',
279 'LBL_LEAVE_PRIVATE_ROOM' => 'leave_private_room',
280 'LBL_LEFT_PRIVATE_ROOM' => 'left_private_room',
281 'LBL_JOIN' => 'chat_join',
282 'LBL_DELETE_PRIVATE_ROOM' => 'delete_private_room',
283 'LBL_DELETE_PRIVATE_ROOM_QUESTION' => 'delete_private_room_question',
284 'LBL_INVITE_TO_PRIVATE_ROOM' => 'invite_to_private_room',
285 'LBL_KICK' => 'chat_kick',
286 'LBL_BAN' => 'chat_ban',
287 'LBL_KICK_QUESTION' => 'kick_question',
288 'LBL_BAN_QUESTION' => 'ban_question',
289 'LBL_ADDRESS' => 'chat_address',
290 'LBL_WHISPER' => 'chat_whisper',
291 'LBL_CONNECT' => 'chat_connection_established',
292 'LBL_DISCONNECT' => 'chat_connection_disconnected',
293 'LBL_TO_MAINROOM' => 'chat_to_mainroom',
294 'LBL_CREATE_PRIVATE_ROOM_JS' => 'chat_create_private_room_button',
295 'LBL_WELCOME_TO_CHAT' => 'welcome_to_chat',
296 'LBL_USER_INVITED' => 'user_invited',
297 'LBL_USER_KICKED' => 'user_kicked',
298 'LBL_USER_INVITED_SELF' => 'user_invited_self',
299 'LBL_PRIVATE_ROOM_CLOSED' => 'private_room_closed',
300 'LBL_PRIVATE_ROOM_ENTERED' => 'private_room_entered',
301 'LBL_PRIVATE_ROOM_LEFT' => 'private_room_left',
302 'LBL_PRIVATE_ROOM_ENTERED_USER' => 'private_room_entered_user',
303 'LBL_KICKED_FROM_PRIVATE_ROOM' => 'kicked_from_private_room',
304 'LBL_OK' => 'ok',
305 'LBL_INVITE' => 'chat_invite',
306 'LBL_CANCEL' => 'cancel',
307 'LBL_WHISPER_TO' => 'whisper_to',
308 'LBL_SPEAK_TO' => 'speak_to',
309 'LBL_HISTORY_CLEARED' => 'history_cleared',
310 'LBL_CLEAR_ROOM_HISTORY' => 'clear_room_history',
311 'LBL_CLEAR_ROOM_HISTORY_QUESTION' => 'clear_room_history_question',
312 'LBL_END_WHISPER' => 'end_whisper',
313 'LBL_TIMEFORMAT' => 'lang_timeformat_no_sec',
314 'LBL_DATEFORMAT' => 'lang_dateformat'
315 );
316 foreach ($js_translations as $placeholder => $lng_variable) {
317 $roomTpl->setVariable($placeholder, json_encode($this->ilLng->txt($lng_variable)));
318 }
319
320 $roomTpl->setVariable('LBL_CREATE_PRIVATE_ROOM', $this->ilLng->txt('chat_create_private_room_button'));
321 $roomTpl->setVariable('LBL_CREATE_PRIVATE_ROOM_TEXT', $this->ilLng->txt('create_private_room_text'));
322 $roomTpl->setVariable('LBL_LAYOUT', $this->ilLng->txt('layout'));
323 $roomTpl->setVariable('LBL_SHOW_SETTINGS', $this->ilLng->txt('show_settings'));
324 $roomTpl->setVariable('LBL_USER_IN_ROOM', $this->ilLng->txt('user_in_room'));
325 $roomTpl->setVariable('LBL_USER_IN_ILIAS', $this->ilLng->txt('user_in_ilias'));
326 }
327
331 protected function renderRightUsersBlock(ilTemplate $roomTpl)
332 {
333 $roomTpl->setVariable('LBL_NO_FURTHER_USERS', $this->ilLng->txt('no_further_users'));
334 }
335
342 private function showNameSelection(ilChatroomUser $chat_user)
343 {
344 require_once 'Modules/Chatroom/classes/class.ilChatroomFormFactory.php';
345
346 $name_options = $chat_user->getChatNameSuggestions();
347 $formFactory = new ilChatroomFormFactory();
348 $selectionForm = $formFactory->getUserChatNameSelectionForm($name_options);
349
350 $this->ilCtrl->saveParameter($this->gui, 'sub');
351
352 $selectionForm->addCommandButton('view-joinWithCustomName', $this->ilLng->txt('enter'));
353 $selectionForm->setFormAction(
354 $this->ilCtrl->getFormAction($this->gui, 'view-joinWithCustomName')
355 );
356
357 $this->mainTpl->setVariable('ADM_CONTENT', $selectionForm->getHtml());
358 }
359
366 public function executeDefault($method)
367 {
368 include_once 'Modules/Chatroom/classes/class.ilChatroom.php';
369
370 $this->redirectIfNoPermission('read');
371
372 $this->gui->switchToVisibleMode();
373 $this->setupTemplate();
374
375 $chatSettings = new ilSetting('chatroom');
376 if (!$chatSettings->get('chat_enabled')) {
377 $this->ilCtrl->redirect($this->gui, 'settings-general');
378 exit;
379 }
380
381 $room = ilChatroom::byObjectId($this->gui->object->getId());
382
383 if (!$room->getSetting('allow_anonymous') && $this->ilUser->isAnonymous()) {
384 $this->cancelJoin($this->ilLng->txt('chat_anonymous_not_allowed'));
385 return;
386 }
387
388 $chat_user = new ilChatroomUser($this->ilUser, $room);
389
390 if ($room->getSetting('allow_custom_usernames')) {
391 if ($room->isSubscribed($chat_user->getUserId())) {
392 $chat_user->setUsername($chat_user->getUsername());
393 $this->showRoom($room, $chat_user);
394 } else {
395 $this->showNameSelection($chat_user);
396 }
397 } else {
398 $chat_user->setUsername($this->ilUser->getLogin());
399 $this->showRoom($room, $chat_user);
400 }
401 }
402
406 public function invitePD()
407 {
408 $chatSettings = new ilSetting('chatroom');
409 if (!$chatSettings->get('chat_enabled')) {
410 $this->ilCtrl->redirect($this->gui, 'settings-general');
411 }
412
413 $room = ilChatroom::byObjectId($this->gui->object->getId());
414 $chat_user = new ilChatroomUser($this->ilUser, $room);
415 $user_id = $_REQUEST['usr_id'];
416 $connector = $this->gui->getConnector();
417 $title = $room->getUniquePrivateRoomTitle($chat_user->buildLogin());
418 $subRoomId = $room->addPrivateRoom($title, $chat_user, array('public' => false));
419
420 $room->inviteUserToPrivateRoom($user_id, $subRoomId);
421 $connector->sendCreatePrivateRoom($room->getRoomId(), $subRoomId, $chat_user->getUserId(), $title);
422 $connector->sendInviteToPrivateRoom($room->getRoomId(), $subRoomId, $chat_user->getUserId(), $user_id);
423
424 $room->sendInvitationNotification($this->gui, $chat_user, $user_id, $subRoomId);
425
426 $_REQUEST['sub'] = $subRoomId;
427
428 $_SESSION['show_invitation_message'] = $user_id;
429
430 $this->ilCtrl->setParameter($this->gui, 'sub', $subRoomId);
431 $this->ilCtrl->redirect($this->gui, 'view');
432 }
433
437 public function logout()
438 {
442 $pid = $this->tree->getParentId($this->gui->getRefId());
443 $this->ilCtrl->setParameterByClass('ilrepositorygui', 'ref_id', $pid);
444 $this->ilCtrl->redirectByClass('ilrepositorygui', '');
445 }
446
450 public function lostConnection()
451 {
452 if (isset($_GET['msg'])) {
453 switch ($_GET['msg']) {
454 case 'kicked':
455 ilUtil::sendFailure($this->ilLng->txt('kicked'), true);
456 break;
457
458 case 'banned':
459 ilUtil::sendFailure($this->ilLng->txt('banned'), true);
460 break;
461
462 default:
463 ilUtil::sendFailure($this->ilLng->txt('lost_connection'), true);
464 break;
465 }
466 } else {
467 ilUtil::sendFailure($this->ilLng->txt('lost_connection'), true);
468 }
469
470 $this->ilCtrl->redirectByClass('ilinfoscreengui', 'info');
471 }
472
473 public function getUserProfileImages()
474 {
475 global $DIC;
476
477 $response = array();
478
479 if (!$this->ilUser) {
480 echo json_encode($response);
481 exit();
482 }
483
484 if (!isset($_GET['usr_ids']) || strlen($_GET['usr_ids']) == 0) {
485 echo json_encode($response);
486 exit();
487 }
488
489 $this->ilLng->loadLanguageModule('user');
490
492
493 $user_ids = array_filter(array_map('intval', array_map('trim', explode(',', $_GET['usr_ids']))));
494
495 $room = ilChatroom::byObjectId($this->gui->object->getId());
496 $chatRoomUserDetails = ilChatroomUser::getUserInformation($user_ids, $room->getRoomId());
497 $chatRoomUserDetailsByUsrId = array_combine(
498 array_map(
499 function (stdClass $userData) {
500 return $userData->id;
501 },
502 $chatRoomUserDetails
503 ),
504 $chatRoomUserDetails
505 );
506
507 $public_data = ilUserUtil::getNamePresentation($user_ids, true, false, '', false, true, false, true);
508 $public_names = ilUserUtil::getNamePresentation($user_ids, false, false, '', false, true, false, false);
509
510 foreach ($user_ids as $usr_id) {
511 if (!array_key_exists($usr_id, $chatRoomUserDetailsByUsrId)) {
512 continue;
513 }
514
515 if ($room->getSetting('allow_custom_usernames')) {
517 $avatar = $DIC["user.avatar.factory"]->avatar('xsmall');
518 $avatar->setUsrId(ANONYMOUS_USER_ID);
519 $avatar->setName(ilStr::subStr($chatRoomUserDetailsByUsrId[$usr_id]->login, 0, 2));
520
521 $public_name = $chatRoomUserDetailsByUsrId[$usr_id]->login;
522 $public_image = $avatar->getUrl();
523 } else {
524 $public_image = isset($public_data[$usr_id]) && isset($public_data[$usr_id]['img']) ? $public_data[$usr_id]['img'] : '';
525 $public_name = '';
526 if (isset($public_names[$usr_id])) {
527 $public_name = $public_names[$usr_id];
528 if ('unknown' == $public_name && isset($public_data[$usr_id]) && isset($public_data[$usr_id]['login'])) {
529 $public_name = $public_data[$usr_id]['login'];
530 }
531 }
532 }
533
534 $response[$usr_id] = [
535 'public_name' => $public_name,
536 'profile_image' => $public_image,
537 ];
538 }
539
540 echo json_encode($response);
541 exit();
542 }
543}
$failure
exit
Definition: backend.php:16
$_GET["client_id"]
$_SESSION["AccountId"]
An exception for terminatinating execution or to throw for unit testing.
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:613
Class ilChatroomFormFactory.
Class ilChatroomGUIHandler.
Class ilChatroomUser.
static getUserInformation(array $usrIds, int $roomId=null)
getChatNameSuggestions()
Returns an array of chat-name suggestions.
getUserId()
Returns Ilias User ID.
getUsername()
Returns username from Object or SESSION.
Class ilChatroomViewGUI.
joinWithCustomName()
Joins user to chatroom with custom username, fetched from $_REQUEST['custom_username_text'] or by cal...
renderLanguageVariables(ilTemplate $roomTpl)
renderFileUploadForm(ilTemplate $roomTpl)
Prepares Fileupload form and displays it.
renderRightUsersBlock(ilTemplate $roomTpl)
executeDefault($method)
Chatroom and Chatuser get prepared before $this->showRoom method is called.
setupTemplate()
Adds CSS and JavaScript files that should be included in the header.
showNameSelection(ilChatroomUser $chat_user)
Prepares and displays name selection.
cancelJoin($message)
Calls ilUtil::sendFailure method using given $message as parameter.
showRoom(ilChatroom $room, ilChatroomUser $chat_user)
Prepares and displays chatroom and connects user to it.
renderSendMessageBox(ilTemplate $roomTpl)
Class ilChatroom.
isSubscribed($chat_userid)
Returns true if entry exists in userTable matching given $chat_userid and $this->roomId.
isUserBanned($user_id)
Returns true if there's an entry in banTable matching roomId and given $user_id.
connectUser(ilChatroomUser $user)
Connects user by inserting userdata into userTable.
static byObjectId($object_id)
Returns ilChatroom object by given $object_id.
getConnectedUsers($only_data=true)
Returns an array of connected users.
static checkUserPermissions($permissions, $ref_id, $send_info=true)
Checks user permissions by given array and ref_id.
getActivePrivateRooms($userid)
subscribeUserToPrivateRoom($room_id, $user_id)
getLastMessages($number, $chatuser=null)
getRoomId()
Returns roomID from $this->roomId.
getSetting($name)
Returns setting from $this->settings array by given name.
isAllowedToEnterPrivateRoom($chat_userid, $proom_id)
This class provides processing control methods.
getLinkTargetByClass( $a_class, $a_cmd="", $a_anchor="", $a_asynch=false, $xml_style=true)
Get link target for command using gui class name.
getFormAction( $a_gui_obj, $a_fallback_cmd="", $a_anchor="", $a_asynch=false, $xml_style=true)
Get form action url for gui class object.
saveParameter($a_obj, $a_parameter)
Set parameters that should be passed in every form and link of a gui class.
setParameterByClass($a_class, $a_parameter, $a_value)
Same as setParameterByClass, except that a class name is passed.
redirectByClass($a_class, $a_cmd="", $a_anchor="", $a_asynch=false)
Redirect to other gui class using class name.
redirect($a_gui_obj, $a_cmd="", $a_anchor="", $a_asynch=false)
Redirect to another command.
getLinkTarget( $a_gui_obj, $a_cmd="", $a_anchor="", $a_asynch=false, $xml_style=true)
Get link target for command using gui object.
setParameter($a_obj, $a_parameter, $a_value)
Set parameters that should be passed a form and link of a gui class.
static initJS(ilTemplate $a_main_tpl=null)
Init javascript.
const PANEL_STYLE_SECONDARY
const HEADING_STYLE_BLOCK
static getInstance()
Get instance.
ILIAS Setting Class.
static subStr($a_str, $a_start, $a_length=null)
Definition: class.ilStr.php:15
special template class to simplify handling of ITX/PEAR
static getNamePresentation( $a_user_id, $a_user_image=false, $a_profile_link=false, $a_profile_back_link="", $a_force_first_lastname=false, $a_omit_login=false, $a_sortable=true, $a_return_data_array=false, $a_ctrl_path="ilpublicuserprofilegui")
Default behaviour is:
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static setTokenMaxLifetimeInSeconds($token_max_lifetime_in_seconds)
$key
Definition: croninfo.php:18
catch(Exception $e) $message
$response
global $DIC
Definition: saml.php:7