ILIAS
Release_4_2_x_branch Revision 61807
|
Class ilChatroomViewTask. More...
Public Member Functions | |
__construct (ilDBayObjectGUI $gui) | |
Constructor. | |
saveSettings () | |
Saves settings fetched from $_POST. | |
saveClientSettings () | |
Saves client settings fetched from $_POST. | |
serversettings (ilPropertyFormGUI $form=null) | |
Prepares view form and displays it. | |
executeDefault ($method) | |
Calls this->view() method. | |
clientsettings (ilPropertyFormGUI $form=null) | |
forcePublicRoom () | |
createPublicRoom () | |
getServerStatus () | |
__construct (ilDBayObjectGUI $gui) | |
Constructor. | |
joinWithCustomName () | |
Joins user to chatroom with custom username, fetched from $_REQUEST['custom_username_text'] or by calling buld method. | |
executeDefault ($method) | |
Chatroom and Chatuser get prepared before $this->showRoom method is called. | |
invitePD () | |
renderFileUploadForm ($roomTpl) | |
Prepares Fileupload form and displays it. | |
logout () | |
Performs logout. | |
lostConnection () | |
Public Member Functions inherited from ilDBayTaskHandler | |
execute ($method) | |
Executes given $method if existing, otherwise executes executeDefault() method. |
Protected Member Functions | |
writeClientSettingsToFile ($settings) | |
Writes client settings to client.properties file. | |
getClientFileContent ($settings) | |
Formats content for client settings file. | |
writeDataToFile ($settings) | |
Writes server settings to server.properties file. | |
getFileContent ($settings) | |
Builds and formats content tot write in server.properties file. | |
checkDirectory () | |
Checks if external chatroom directory exists or can be created. | |
checkPrivHosts ($ipnumbers) | |
Checks if a valid IP number or a comma-separated string of valid IP numbers is given. | |
renderRightUsersDock ($roomTpl) | |
renderSendMessageBox ($roomTpl) |
Private Member Functions | |
showSoapWarningIfNeeded () | |
defaultActions () | |
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. | |
showNameSelection (ilChatroomUser $chat_user) | |
Prepares and displays name selection. | |
setupTemplate () | |
Adds CSS and JavaScript files that should be included in the header. | |
renderFontSettings ($roomTpl, $defaultSettings) | |
Prepares given $roomTpl with font settings using given $defaultSettings among other things. |
Private Attributes | |
$gui | |
$commonSettings |
ilChatroomViewTask::__construct | ( | ilDBayObjectGUI | $gui | ) |
Constructor.
Sets $this->gui using given $gui
ilDBayObjectGUI | $gui |
Reimplemented from ilDBayTaskHandler.
Definition at line 27 of file class.ilChatroomViewTask.php.
References $gui.
ilChatroomViewTask::__construct | ( | ilDBayObjectGUI | $gui | ) |
Constructor.
Requires ilChatroom and ilChatroomUser. Sets $this->gui using given $gui.
ilDBayObjectGUI | $gui |
Reimplemented from ilDBayTaskHandler.
Definition at line 25 of file class.ilChatroomViewTask.php.
References $gui.
|
private |
Calls ilUtil::sendFailure method using given $message as parameter.
string | $message |
Definition at line 37 of file class.ilChatroomViewTask.php.
References ilUtil\sendFailure().
Referenced by showRoom().
|
protected |
Checks if external chatroom directory exists or can be created.
Definition at line 236 of file class.ilChatroomViewTask.php.
References $lng, ilUtil\getDataDir(), and ilUtil\makeDir().
Referenced by writeClientSettingsToFile(), and writeDataToFile().
|
protected |
Checks if a valid IP number or a comma-separated string of valid IP numbers is given.
string | $ipnumbers |
Definition at line 260 of file class.ilChatroomViewTask.php.
Referenced by saveSettings().
ilChatroomViewTask::clientsettings | ( | ilPropertyFormGUI | $form = null | ) |
Definition at line 344 of file class.ilChatroomViewTask.php.
References $data, $ilCtrl, $lng, $tpl, ilUtil\_getHttpPath(), ilChatroomServerConnector\checkServerConnection(), ilChatroom\checkUserPermissions(), defaultActions(), ilUtil\sendInfo(), and showSoapWarningIfNeeded().
Referenced by saveClientSettings(), and saveSettings().
ilChatroomViewTask::createPublicRoom | ( | ) |
Definition at line 448 of file class.ilChatroomViewTask.php.
References $lng, and ilUtil\sendSuccess().
Referenced by forcePublicRoom().
|
private |
Definition at line 415 of file class.ilChatroomViewTask.php.
References forcePublicRoom().
Referenced by clientsettings(), and serversettings().
ilChatroomViewTask::executeDefault | ( | $method | ) |
Calls this->view() method.
string | $method |
Reimplemented from ilDBayTaskHandler.
Definition at line 338 of file class.ilChatroomViewTask.php.
References $ilCtrl.
ilChatroomViewTask::executeDefault | ( | $method | ) |
Chatroom and Chatuser get prepared before $this->showRoom method is called.
If custom usernames are allowed, $this->showNameSelection method is called if user isn't already registered in the Chatroom.
ilObjUser $ilUser ilLanguage $lng
string | $method |
Reimplemented from ilDBayTaskHandler.
Definition at line 416 of file class.ilChatroomViewTask.php.
References $ilCtrl, $lng, ilChatroom\byObjectId(), ilChatroom\checkUserPermissions(), and exit.
ilChatroomViewTask::forcePublicRoom | ( | ) |
Definition at line 422 of file class.ilChatroomViewTask.php.
References $ref_id, ilObjChatroom\_getPublicRefId(), ilObject\_hasUntrashedReference(), ilObject\_lookupObjId(), createPublicRoom(), and ilObjectFactory\getInstanceByRefId().
Referenced by defaultActions().
|
protected |
Formats content for client settings file.
unknown_type | $settings |
Definition at line 173 of file class.ilChatroomViewTask.php.
Referenced by writeClientSettingsToFile().
|
protected |
Builds and formats content tot write in server.properties file.
array | $settings |
Definition at line 213 of file class.ilChatroomViewTask.php.
Referenced by writeDataToFile().
ilChatroomViewTask::getServerStatus | ( | ) |
Definition at line 455 of file class.ilChatroomViewTask.php.
References ilChatroomServerConnector\checkServerConnection().
ilChatroomViewTask::invitePD | ( | ) |
Definition at line 455 of file class.ilChatroomViewTask.php.
References $_REQUEST, $_SESSION, $ilCtrl, $lng, $title, ilChatroom\byObjectId(), and exit.
ilChatroomViewTask::joinWithCustomName | ( | ) |
Joins user to chatroom with custom username, fetched from $_REQUEST['custom_username_text'] or by calling buld method.
If sucessful, $this->showRoom method is called, otherwise $this->showNameSelection.
ilObjUser $ilUser ilLanguage $lng
Definition at line 382 of file class.ilChatroomViewTask.php.
References $_REQUEST, $lng, and ilChatroom\byObjectId().
ilChatroomViewTask::logout | ( | ) |
Performs logout.
ilTree $tree
Definition at line 623 of file class.ilChatroomViewTask.php.
References ilUtil\redirect().
ilChatroomViewTask::lostConnection | ( | ) |
Definition at line 634 of file class.ilChatroomViewTask.php.
References $ilCtrl, $lng, ilUtil\redirect(), and ilUtil\sendFailure().
ilChatroomViewTask::renderFileUploadForm | ( | $roomTpl | ) |
Prepares Fileupload form and displays it.
ilCtrl2 $ilCtrl
string | $roomTpl |
Definition at line 604 of file class.ilChatroomViewTask.php.
References $ilCtrl.
|
private |
Prepares given $roomTpl with font settings using given $defaultSettings among other things.
ilLanguage $lng ilCtrl2 $ilCtrl
ilTemplate | $roomTpl | |
array | $defaultSettings |
Definition at line 512 of file class.ilChatroomViewTask.php.
|
protected |
Definition at line 260 of file class.ilChatroomViewTask.php.
References $lng.
|
protected |
Definition at line 313 of file class.ilChatroomViewTask.php.
References $lng.
ilChatroomViewTask::saveClientSettings | ( | ) |
Saves client settings fetched from $_POST.
ilCtrl2 $ilCtrl ilLanguage $lng
Definition at line 98 of file class.ilChatroomViewTask.php.
References $_POST, $ilCtrl, $lng, clientsettings(), ilChatroomAdmin\saveClientSettings(), ilUtil\sendSuccess(), and writeClientSettingsToFile().
ilChatroomViewTask::saveSettings | ( | ) |
Saves settings fetched from $_POST.
ilCtrl2 $ilCtrl ilLanguage $lng
Definition at line 48 of file class.ilChatroomViewTask.php.
References $_POST, $ilCtrl, $lng, checkPrivHosts(), clientsettings(), ilChatroomAdmin\saveGeneralSettings(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and writeDataToFile().
ilChatroomViewTask::serversettings | ( | ilPropertyFormGUI | $form = null | ) |
Prepares view form and displays it.
ilObjUser $ilUser ilTemplate $tpl ilCtrl2 $ilCtrl ilLanguage $lng
ilPropertyFormGUI | $form |
Definition at line 290 of file class.ilChatroomViewTask.php.
References $ilCtrl, $lng, $tpl, ilUtil\_getHttpPath(), ilChatroomServerConnector\checkServerConnection(), ilChatroom\checkUserPermissions(), defaultActions(), ilChatroomAdmin\loadGeneralSettings(), ilUtil\sendInfo(), and showSoapWarningIfNeeded().
|
private |
Adds CSS and JavaScript files that should be included in the header.
ilTemplate $tpl
Definition at line 358 of file class.ilChatroomViewTask.php.
References $tpl.
|
private |
Prepares and displays name selection.
Fetches name option by calling getChatNameSuggestions method on given $chat_user object.
ilLanguage $lng ilCtrl2 $ilCtrl iltemplate $tpl
ilChatroomUser | $chat_user |
Definition at line 334 of file class.ilChatroomViewTask.php.
References $ilCtrl, $lng, $tpl, and ilChatroomUser\getChatNameSuggestions().
|
private |
Prepares and displays chatroom and connects user to it.
iltemplate $tpl ilObjUser $ilUser ilCtrl2 $ilCtrl ilLanguage $lng
ilChatroom | $room | |
ilChatroomUser | $chat_user |
Definition at line 52 of file class.ilChatroomViewTask.php.
References $_GET, $_REQUEST, $_SESSION, $ilCtrl, $lng, $query, $tpl, ilChatroomSmilies\_getSmilies(), ilChatroom\addHistoryEntry(), cancelJoin(), ilChatroom\checkUserPermissions(), ilChatroom\connectUser(), exit, ilChatroom\getActivePrivateRooms(), ilChatroom\getConnectedUsers(), ilChatroom\getLastMessages(), ilChatroom\getRoomId(), ilChatroom\getSetting(), ilChatroomUser\getUserId(), ilChatroomUser\getUsername(), ilChatroom\isAllowedToEnterPrivateRoom(), ilChatroom\isSubscribed(), ilChatroom\isUserBanned(), ilUtil\redirect(), ilUtil\sendFailure(), and ilChatroom\subscribeUserToPrivateRoom().
|
private |
Definition at line 33 of file class.ilChatroomViewTask.php.
References $lng, and ilUtil\sendInfo().
Referenced by clientsettings(), and serversettings().
|
protected |
Writes client settings to client.properties file.
array | $settings |
Definition at line 153 of file class.ilChatroomViewTask.php.
References checkDirectory(), and getClientFileContent().
Referenced by saveClientSettings().
|
protected |
Writes server settings to server.properties file.
array | $settings |
Definition at line 193 of file class.ilChatroomViewTask.php.
References checkDirectory(), and getFileContent().
Referenced by saveSettings().
|
private |
Definition at line 18 of file class.ilChatroomViewTask.php.
|
private |
Definition at line 17 of file class.ilChatroomViewTask.php.
Referenced by __construct().