ILIAS  release_7 Revision v7.30-3-g800a261c036
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->redirectIfNoPermission('read');
24
25 $this->gui->switchToVisibleMode();
26 $this->setupTemplate();
27 $room = ilChatroom::byObjectId($this->gui->object->getId());
28 $chat_user = new ilChatroomUser($this->ilUser, $room);
29 $failure = false;
30 $username = '';
31
32 if ($_REQUEST['custom_username_radio'] == 'custom_username') {
33 $username = $_REQUEST['custom_username_text'];
34 } elseif (method_exists($chat_user, 'build' . $_REQUEST['custom_username_radio'])) {
35 $username = $chat_user->{'build' . $_REQUEST['custom_username_radio']}();
36 } else {
37 $failure = true;
38 }
39
40 if (!$failure && trim($username) != '') {
41 if (!$room->isSubscribed($chat_user->getUserId())) {
42 $chat_user->setUsername($chat_user->buildUniqueUsername($username));
43 }
44
45 $this->showRoom($room, $chat_user);
46 } else {
47 ilUtil::sendFailure($this->ilLng->txt('no_username_given'));
48 $this->showNameSelection($chat_user);
49 }
50 }
51
55 private function setupTemplate()
56 {
57 $this->mainTpl->addJavaScript('Modules/Chatroom/js/chat.js');
58 $this->mainTpl->addJavaScript('Modules/Chatroom/js/iliaschat.jquery.js');
59 $this->mainTpl->addJavaScript('node_modules/jquery-outside-events/jquery.ba-outside-events.js');
60
61 $this->mainTpl->addJavaScript('./Services/UIComponent/AdvancedSelectionList/js/AdvancedSelectionList.js');
62
63 $this->mainTpl->addCSS('Modules/Chatroom/templates/default/style.css');
64
65 $this->mainTpl->setPermanentLink($this->gui->object->getType(), $this->gui->object->getRefId());
66 }
67
73 private function showRoom(ilChatroom $room, ilChatroomUser $chat_user)
74 {
75 $this->redirectIfNoPermission('read');
76
77 $user_id = $chat_user->getUserId();
78
79 $this->navigationHistory->addItem($_GET['ref_id'], $this->ilCtrl->getLinkTargetByClass('ilrepositorygui', 'view'), 'chtr');
80
81 if ($room->isUserBanned($user_id)) {
82 $this->cancelJoin($this->ilLng->txt('banned'));
83 return;
84 }
85
86 $scope = $room->getRoomId();
87 $connector = $this->gui->getConnector();
88 $response = @$connector->connect($scope, $user_id);
89
90 if (!$response) {
91 ilUtil::sendFailure($this->ilLng->txt('unable_to_connect'), true);
92 $this->ilCtrl->redirectByClass('ilinfoscreengui', 'info');
93 }
94
95 if (!$room->isSubscribed($chat_user->getUserId())) {
96 $room->connectUser($chat_user);
97 }
98
99 $subScope = 0;
100 $response = $connector->sendEnterPrivateRoom($scope, $subScope, $user_id);
101 if (!$response) {
102 ilUtil::sendFailure($this->ilLng->txt('unable_to_connect'), true);
103 $this->ilCtrl->redirectByClass('ilinfoscreengui', 'info');
104 }
105
106 $connection_info = json_decode($response);
107 $settings = $connector->getSettings();
108 $known_private_room = $room->getActivePrivateRooms($this->ilUser->getId());
109
110 $initial = new stdClass();
111 $initial->users = $room->getConnectedUsers();
112 $initial->private_rooms = array_values($known_private_room);
113 $initial->redirect_url = $this->ilCtrl->getLinkTarget($this->gui, 'view-lostConnection', '', false, false);
114 $initial->profile_image_url = $this->ilCtrl->getLinkTarget($this->gui, 'view-getUserProfileImages', '', true, false);
115 $initial->no_profile_image_url = ilUtil::getImagePath('no_photo_xxsmall.jpg');
116 $initial->private_rooms_enabled = (boolean) $room->getSetting('private_rooms_enabled');
117 $initial->subdirectory = $settings->getSubDirectory();
118
119 $initial->userinfo = array(
120 'moderator' => ilChatroom::checkUserPermissions('moderate', (int) $_GET['ref_id'], false),
121 'id' => $chat_user->getUserId(),
122 'login' => $chat_user->getUsername()
123 );
124
125 $smileys = array();
126
127 include_once('Modules/Chatroom/classes/class.ilChatroomSmilies.php');
128
129 if ($settings->getSmiliesEnabled()) {
130 $smileys_array = ilChatroomSmilies::_getSmilies();
131 foreach ($smileys_array as $smiley_array) {
132 $new_keys = array();
133 $new_val = '';
134 foreach ($smiley_array as $key => $value) {
135 if ($key == 'smiley_keywords') {
136 $new_keys = explode("\n", $value);
137 }
138
139 if ($key == 'smiley_fullpath') {
140 $new_val = $value;
141 }
142 }
143
144 if (!$new_keys || !$new_val) {
145 continue;
146 }
147
148 foreach ($new_keys as $new_key) {
149 $smileys[$new_key] = $new_val;
150 }
151 }
152
153 $initial->smileys = $smileys;
154 } else {
155 $initial->smileys = '{}';
156 }
157
158 $initial->messages = array();
159
160 if (isset($_REQUEST['sub'])) {
161 if ($known_private_room[$_REQUEST['sub']]) {
162 if (!$room->isAllowedToEnterPrivateRoom($chat_user->getUserId(), $_REQUEST['sub'])) {
163 $initial->messages[] = array(
164 'type' => 'error',
165 'message' => $this->ilLng->txt('not_allowed_to_enter'),
166 );
167 } else {
168 $scope = $room->getRoomId();
169 $params = array();
170 $params['user'] = $chat_user->getUserId();
171 $params['sub'] = $_REQUEST['sub'];
172
173 $params['message'] = json_encode(
174 array(
175 'type' => 'private_room_entered',
176 'user' => $user_id
177 )
178 );
179
180 $connector = $this->gui->getConnector();
181 $response = $connector->sendEnterPrivateRoom($scope, $_REQUEST['sub'], $chat_user->getUserId());
182
183 if ($this->isSuccessful($response)) {
184 $room->subscribeUserToPrivateRoom($params['sub'], $params['user']);
185 }
186
187 $initial->enter_room = $_REQUEST['sub'];
188 }
189 } else {
190 $initial->messages[] = array(
191 'type' => 'error',
192 'message' => $this->ilLng->txt('user_invited'),
193 );
194 }
195 }
196
197 if ((int) $room->getSetting('display_past_msgs')) {
198 $initial->messages = array_merge($initial->messages, array_reverse($room->getLastMessages($room->getSetting('display_past_msgs'), $chat_user)));
199 }
200
201 $roomTpl = new ilTemplate('tpl.chatroom.html', true, true, 'Modules/Chatroom');
202 $roomTpl->setVariable('SESSION_ID', $connection_info->{'session-id'});
203 $roomTpl->setVariable('BASEURL', $settings->generateClientUrl());
204 $roomTpl->setVariable('INSTANCE', $settings->getInstance());
205 $roomTpl->setVariable('SCOPE', $scope);
206 $roomTpl->setVariable('MY_ID', $user_id);
207 $roomTpl->setVariable('INITIAL_DATA', json_encode($initial));
208 $roomTpl->setVariable('POSTURL', $this->ilCtrl->getLinkTarget($this->gui, 'postMessage', '', true, true));
209
210 $roomTpl->setVariable('ACTIONS', $this->ilLng->txt('actions'));
211 $roomTpl->setVariable('LBL_CREATE_PRIVATE_ROOM', $this->ilLng->txt('create_private_room_label'));
212 $roomTpl->setVariable('LBL_USER', $this->ilLng->txt('user'));
213 $roomTpl->setVariable('LBL_USER_TEXT', $this->ilLng->txt('invite_username'));
214 $roomTpl->setVariable('LBL_AUTO_SCROLL', $this->ilLng->txt('auto_scroll'));
215
216 $roomTpl->setVariable('INITIAL_USERS', json_encode($room->getConnectedUsers()));
217
218 $this->renderFileUploadForm($roomTpl);
219 $this->renderSendMessageBox($roomTpl);
220 $this->renderLanguageVariables($roomTpl);
221
222 require_once 'Services/UIComponent/Modal/classes/class.ilModalGUI.php';
224
225 $roomRightTpl = new ilTemplate('tpl.chatroom_right.html', true, true, 'Modules/Chatroom');
226 $this->renderRightUsersBlock($roomRightTpl);
227
228 require_once 'Services/UIComponent/Panel/classes/class.ilPanelGUI.php';
229 $right_content_panel = ilPanelGUI::getInstance();
230 $right_content_panel->setHeading($this->ilLng->txt('users'));
231 $right_content_panel->setPanelStyle(ilPanelGUI::PANEL_STYLE_SECONDARY);
232 $right_content_panel->setHeadingStyle(ilPanelGUI::HEADING_STYLE_BLOCK);
233 $right_content_panel->setBody($roomRightTpl->get());
234
235 $this->mainTpl->setContent($roomTpl->get());
236 $this->mainTpl->setRightContent($right_content_panel->getHTML());
237 }
238
243 private function cancelJoin($message)
244 {
246 }
247
252 public function renderFileUploadForm(ilTemplate $roomTpl)
253 {
254 // @todo: Not implemented yet
255 return;
256
257 require_once 'Modules/Chatroom/classes/class.ilChatroomFormFactory.php';
258 $formFactory = new ilChatroomFormFactory();
259 $file_upload = $formFactory->getFileUploadForm();
260 //$file_upload->setFormAction( $ilCtrl->getFormAction($this->gui, 'UploadFile-uploadFile') );
261 $roomTpl->setVariable('FILE_UPLOAD', $file_upload->getHTML());
262 }
263
267 protected function renderSendMessageBox(ilTemplate $roomTpl)
268 {
269 $roomTpl->setVariable('LBL_MESSAGE', $this->ilLng->txt('chat_message'));
270 $roomTpl->setVariable('LBL_TOALL', $this->ilLng->txt('chat_message_to_all'));
271 $roomTpl->setVariable('LBL_OPTIONS', $this->ilLng->txt('chat_message_options'));
272 $roomTpl->setVariable('LBL_DISPLAY', $this->ilLng->txt('chat_message_display'));
273 $roomTpl->setVariable('LBL_SEND', $this->ilLng->txt('send'));
274 }
275
279 protected function renderLanguageVariables(ilTemplate $roomTpl)
280 {
281 $js_translations = array(
282 'LBL_MAINROOM' => 'chat_mainroom',
283 'LBL_LEAVE_PRIVATE_ROOM' => 'leave_private_room',
284 'LBL_LEFT_PRIVATE_ROOM' => 'left_private_room',
285 'LBL_JOIN' => 'chat_join',
286 'LBL_DELETE_PRIVATE_ROOM' => 'delete_private_room',
287 'LBL_DELETE_PRIVATE_ROOM_QUESTION' => 'delete_private_room_question',
288 'LBL_INVITE_TO_PRIVATE_ROOM' => 'invite_to_private_room',
289 'LBL_KICK' => 'chat_kick',
290 'LBL_BAN' => 'chat_ban',
291 'LBL_KICK_QUESTION' => 'kick_question',
292 'LBL_BAN_QUESTION' => 'ban_question',
293 'LBL_ADDRESS' => 'chat_address',
294 'LBL_WHISPER' => 'chat_whisper',
295 'LBL_CONNECT' => 'chat_connection_established',
296 'LBL_DISCONNECT' => 'chat_connection_disconnected',
297 'LBL_TO_MAINROOM' => 'chat_to_mainroom',
298 'LBL_CREATE_PRIVATE_ROOM_JS' => 'chat_create_private_room_button',
299 'LBL_WELCOME_TO_CHAT' => 'welcome_to_chat',
300 'LBL_USER_INVITED' => 'user_invited',
301 'LBL_USER_KICKED' => 'user_kicked',
302 'LBL_USER_INVITED_SELF' => 'user_invited_self',
303 'LBL_PRIVATE_ROOM_CLOSED' => 'private_room_closed',
304 'LBL_PRIVATE_ROOM_ENTERED' => 'private_room_entered',
305 'LBL_PRIVATE_ROOM_LEFT' => 'private_room_left',
306 'LBL_PRIVATE_ROOM_ENTERED_USER' => 'private_room_entered_user',
307 'LBL_KICKED_FROM_PRIVATE_ROOM' => 'kicked_from_private_room',
308 'LBL_OK' => 'ok',
309 'LBL_INVITE' => 'chat_invite',
310 'LBL_CANCEL' => 'cancel',
311 'LBL_WHISPER_TO' => 'whisper_to',
312 'LBL_SPEAK_TO' => 'speak_to',
313 'LBL_HISTORY_CLEARED' => 'history_cleared',
314 'LBL_CLEAR_ROOM_HISTORY' => 'clear_room_history',
315 'LBL_CLEAR_ROOM_HISTORY_QUESTION' => 'clear_room_history_question',
316 'LBL_END_WHISPER' => 'end_whisper',
317 'LBL_TIMEFORMAT' => 'lang_timeformat_no_sec',
318 'LBL_DATEFORMAT' => 'lang_dateformat'
319 );
320 foreach ($js_translations as $placeholder => $lng_variable) {
321 $roomTpl->setVariable($placeholder, json_encode($this->ilLng->txt($lng_variable)));
322 }
323
324 $roomTpl->setVariable('LBL_CREATE_PRIVATE_ROOM', $this->ilLng->txt('chat_create_private_room_button'));
325 $roomTpl->setVariable('LBL_CREATE_PRIVATE_ROOM_TEXT', $this->ilLng->txt('create_private_room_text'));
326 $roomTpl->setVariable('LBL_LAYOUT', $this->ilLng->txt('layout'));
327 $roomTpl->setVariable('LBL_SHOW_SETTINGS', $this->ilLng->txt('show_settings'));
328 $roomTpl->setVariable('LBL_USER_IN_ROOM', $this->ilLng->txt('user_in_room'));
329 $roomTpl->setVariable('LBL_USER_IN_ILIAS', $this->ilLng->txt('user_in_ilias'));
330 }
331
335 protected function renderRightUsersBlock(ilTemplate $roomTpl)
336 {
337 $roomTpl->setVariable('LBL_NO_FURTHER_USERS', $this->ilLng->txt('no_further_users'));
338 }
339
346 private function showNameSelection(ilChatroomUser $chat_user)
347 {
348 require_once 'Modules/Chatroom/classes/class.ilChatroomFormFactory.php';
349
350 $name_options = $chat_user->getChatNameSuggestions();
351 $formFactory = new ilChatroomFormFactory();
352 $selectionForm = $formFactory->getUserChatNameSelectionForm($name_options);
353
354 $this->ilCtrl->saveParameter($this->gui, 'sub');
355
356 $selectionForm->addCommandButton('view-joinWithCustomName', $this->ilLng->txt('enter'));
357 $selectionForm->setFormAction(
358 $this->ilCtrl->getFormAction($this->gui, 'view-joinWithCustomName')
359 );
360
361 $this->mainTpl->setVariable('ADM_CONTENT', $selectionForm->getHtml());
362 }
363
370 public function executeDefault($requestedMethod)
371 {
372 include_once 'Modules/Chatroom/classes/class.ilChatroom.php';
373
374 $this->redirectIfNoPermission('read');
375
376 $this->gui->switchToVisibleMode();
377 $this->setupTemplate();
378
379 $chatSettings = new ilSetting('chatroom');
380 if (!$chatSettings->get('chat_enabled')) {
381 $this->ilCtrl->redirect($this->gui, 'settings-general');
382 exit;
383 }
384
385 $room = ilChatroom::byObjectId($this->gui->object->getId());
386
387 if (!$room->getSetting('allow_anonymous') && $this->ilUser->isAnonymous()) {
388 $this->cancelJoin($this->ilLng->txt('chat_anonymous_not_allowed'));
389 return;
390 }
391
392 $chat_user = new ilChatroomUser($this->ilUser, $room);
393
394 if ($room->getSetting('allow_custom_usernames')) {
395 if ($room->isSubscribed($chat_user->getUserId())) {
396 $chat_user->setUsername($chat_user->getUsername());
397 $this->showRoom($room, $chat_user);
398 } else {
399 $this->showNameSelection($chat_user);
400 }
401 } else {
402 $chat_user->setUsername($this->ilUser->getLogin());
403 $this->showRoom($room, $chat_user);
404 }
405 }
406
410 public function invitePD()
411 {
412 $chatSettings = new ilSetting('chatroom');
413 if (!$chatSettings->get('chat_enabled')) {
414 $this->ilCtrl->redirect($this->gui, 'settings-general');
415 }
416
417 $room = ilChatroom::byObjectId($this->gui->object->getId());
418 $chat_user = new ilChatroomUser($this->ilUser, $room);
419 $user_id = $_REQUEST['usr_id'];
420 $connector = $this->gui->getConnector();
421 $title = $room->getUniquePrivateRoomTitle($chat_user->buildLogin());
422 $subRoomId = $room->addPrivateRoom($title, $chat_user, array('public' => false));
423
424 $room->inviteUserToPrivateRoom($user_id, $subRoomId);
425 $connector->sendCreatePrivateRoom($room->getRoomId(), $subRoomId, $chat_user->getUserId(), $title);
426 $connector->sendInviteToPrivateRoom($room->getRoomId(), $subRoomId, $chat_user->getUserId(), $user_id);
427
428 $room->sendInvitationNotification($this->gui, $chat_user, $user_id, $subRoomId);
429
430 $_REQUEST['sub'] = $subRoomId;
431
432 $_SESSION['show_invitation_message'] = $user_id;
433
434 $this->ilCtrl->setParameter($this->gui, 'sub', $subRoomId);
435 $this->ilCtrl->redirect($this->gui, 'view');
436 }
437
441 public function logout()
442 {
446 $pid = $this->tree->getParentId($this->gui->getRefId());
447 $this->ilCtrl->setParameterByClass('ilrepositorygui', 'ref_id', $pid);
448 $this->ilCtrl->redirectByClass('ilrepositorygui', '');
449 }
450
454 public function lostConnection()
455 {
456 if (isset($_GET['msg'])) {
457 switch ($_GET['msg']) {
458 case 'kicked':
459 ilUtil::sendFailure($this->ilLng->txt('kicked'), true);
460 break;
461
462 case 'banned':
463 ilUtil::sendFailure($this->ilLng->txt('banned'), true);
464 break;
465
466 default:
467 ilUtil::sendFailure($this->ilLng->txt('lost_connection'), true);
468 break;
469 }
470 } else {
471 ilUtil::sendFailure($this->ilLng->txt('lost_connection'), true);
472 }
473
474 $this->ilCtrl->redirectByClass('ilinfoscreengui', 'info');
475 }
476
477 public function getUserProfileImages()
478 {
479 global $DIC;
480
481 $response = array();
482
483 if (!$this->ilUser) {
484 echo json_encode($response);
485 exit();
486 }
487
488 if (!isset($_GET['usr_ids']) || strlen($_GET['usr_ids']) == 0) {
489 echo json_encode($response);
490 exit();
491 }
492
493 $this->ilLng->loadLanguageModule('user');
494
496
497 $user_ids = array_filter(array_map('intval', array_map('trim', explode(',', $_GET['usr_ids']))));
498
499 $room = ilChatroom::byObjectId($this->gui->object->getId());
500 $chatRoomUserDetails = ilChatroomUser::getUserInformation($user_ids, $room->getRoomId());
501 $chatRoomUserDetailsByUsrId = array_combine(
502 array_map(
503 function (stdClass $userData) {
504 return $userData->id;
505 },
506 $chatRoomUserDetails
507 ),
508 $chatRoomUserDetails
509 );
510
511 $public_data = ilUserUtil::getNamePresentation($user_ids, true, false, '', false, true, false, true);
512 $public_names = ilUserUtil::getNamePresentation($user_ids, false, false, '', false, true, false, false);
513
514 foreach ($user_ids as $usr_id) {
515 if (!array_key_exists($usr_id, $chatRoomUserDetailsByUsrId)) {
516 continue;
517 }
518
519 if ($room->getSetting('allow_custom_usernames')) {
521 $avatar = $DIC["user.avatar.factory"]->avatar('xsmall');
522 $avatar->setUsrId(ANONYMOUS_USER_ID);
523 $avatar->setName(ilStr::subStr($chatRoomUserDetailsByUsrId[$usr_id]->login, 0, 2));
524
525 $public_name = $chatRoomUserDetailsByUsrId[$usr_id]->login;
526 $public_image = $avatar->getUrl();
527 } else {
528 $public_image = isset($public_data[$usr_id]) && isset($public_data[$usr_id]['img']) ? $public_data[$usr_id]['img'] : '';
529 $public_name = '';
530 if (isset($public_names[$usr_id])) {
531 $public_name = $public_names[$usr_id];
532 if ('unknown' == $public_name && isset($public_data[$usr_id]) && isset($public_data[$usr_id]['login'])) {
533 $public_name = $public_data[$usr_id]['login'];
534 }
535 }
536 }
537
538 $response[$usr_id] = [
539 'public_name' => $public_name,
540 'profile_image' => $public_image,
541 ];
542 }
543
544 echo json_encode($response);
545 exit();
546 }
547}
$failure
$_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:615
Class ilChatroomFormFactory.
Class ilChatroomGUIHandler.
redirectIfNoPermission($permission)
Checks for requested permissions and redirects if the permission check failed.
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.
executeDefault($requestedMethod)
Chatroom and Chatuser get prepared before $this->showRoom method is called.
renderRightUsersBlock(ilTemplate $roomTpl)
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.
getFormAction( $a_gui_obj, $a_fallback_cmd="", $a_anchor="", $a_asynch=false, $xml_style=false)
Get form action url for gui class object.
getLinkTargetByClass( $a_class, $a_cmd="", $a_anchor="", $a_asynch=false, $xml_style=false)
Get link target for command using gui class name.
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=false)
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(ilGlobalTemplateInterface $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)
const ANONYMOUS_USER_ID
Definition: constants.php:25
global $DIC
Definition: goto.php:24
exit
Definition: login.php:29
$response
login()
Definition: login.php:2
$message
Definition: xapiexit.php:14