ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
Class ilChatroom. More...
Public Member Functions | |
initialize (array $rowdata) | |
Sets $this->roomId by given array $rowdata and calls setSetting method foreach available setting in $this->availableSettings. More... | |
setSetting ($name, $value) | |
Sets given name and value as setting into $this->settings array. More... | |
getDescription () | |
getSetting ($name) | |
Returns setting from $this->settings array by given name. More... | |
save () | |
Saves settings using $this->settings. More... | |
saveSettings (array $settings) | |
Saves settings into settingsTable using given settings array. More... | |
addHistoryEntry ($message, $recipient=null, $publicMessage=true) | |
Inserts entry into historyTable. More... | |
getConnectedUsers () | |
Returns an array of connected users. More... | |
disconnectUser ($user_id) | |
Creates userId array by given $user object and calls disconnectUsers method. More... | |
disconnectUsers (array $userIds) | |
Disconnects users by deleting userdata from userTable using given userId array. More... | |
getSettings () | |
Returns $this->settings array. More... | |
isSubscribed ($chat_userid) | |
Returns true if entry exists in userTable matching given $chat_userid and $this->roomId. More... | |
isAllowedToEnterPrivateRoom ($chat_userid, $proom_id) | |
getHistory (ilDateTime $from=null, ilDateTime $to=null, $restricted_session_userid=null, $proom_id=0) | |
Returns array containing history data selected from historyTable by given ilDateTime, $restricted_session_userid and matching roomId. More... | |
getRoomId () | |
Returns roomID from $this->roomId. More... | |
getPrivateRoomSessions (ilDateTime $from=null, ilDateTime $to=null, $user_id=0, $room_id=0) | |
saveFileUploadToDb ($user_id, $filename, $type) | |
Saves information about file uploads in DB. More... | |
banUser ($user_id, $comment='') | |
Inserts user into banTable, using given $user_id ilDBInterface $ilDB. More... | |
unbanUser ($user_id) | |
Deletes entry from banTable matching roomId and given $user_id and returns true if sucessful. More... | |
isUserBanned ($user_id) | |
Returns true if there's an entry in banTable matching roomId and given $user_id ilDBInterface $ilDB. More... | |
getBannedUsers () | |
Returns an multidimensional array containing userdata from users having an entry in banTable with matching roomId. More... | |
getLastSession (ilChatroomUser $user) | |
Returns last session from user. More... | |
getSessions (ilChatroomUser $user) | |
Returns all session from user Returns all from sessionTable where user_id matches userId from given $user object. More... | |
addPrivateRoom ($title, ilChatroomUser $owner, $settings) | |
closePrivateRoom ($id) | |
isOwnerOfPrivateRoom ($user_id, $proom_id) | |
getChatURL ($gui, $scope_id=0) | |
ilCtrl $ilCtrl More... | |
getTitle () | |
inviteUserToPrivateRoomByLogin ($login, $proom_id) | |
getActivePrivateRooms ($userid) | |
listUsersInPrivateRoom ($private_room_id) | |
subscribeUserToPrivateRoom ($room_id, $user_id) | |
userIsInPrivateRoom ($room_id, $user_id) | |
unsubscribeUserFromPrivateRoom ($room_id, $user_id) | |
ilDBInterface $ilDB More... | |
countActiveUsers () | |
getUniquePrivateRoomTitle ($title) | |
getPrivateSubRooms ($parent_room, $user_id) | |
getRefIdByRoomId ($room_id) | |
Returns ref_id of given room_id ilDBInterface $ilDB. More... | |
getLastMessagesForChatViewer ($number, $chatuser=null) | |
getLastMessages ($number, $chatuser=null) | |
clearMessages ($sub_room) | |
Static Public Member Functions | |
static | checkUserPermissions ($permissions, $ref_id, $send_info=true) |
Checks user permissions by given array and ref_id. More... | |
static | checkPermissionsOfUser ($usr_id, $permissions, $ref_id) |
Checks user permissions in question for a given user id in relation to a given ref_id. More... | |
static | byObjectId ($object_id) |
Returns ilChatroom object by given $object_id. More... | |
static | byRoomId ($room_id, $initObject=false) |
Returns ilChatroom by given $room_id ilDBInterface $ilDB. More... | |
static | disconnectAllUsersFromAllRooms () |
Deletes all entrys from userTable. More... | |
static | findDeletablePrivateRooms () |
static | lookupPrivateRoomTitle ($proom_id) |
Private Member Functions | |
phpTypeToMDBType ($type) | |
Private Attributes | |
$settings = array() | |
$availableSettings | |
$roomId | |
$object | |
Static Private Attributes | |
static | $settingsTable = 'chatroom_settings' |
static | $historyTable = 'chatroom_history' |
static | $userTable = 'chatroom_users' |
static | $sessionTable = 'chatroom_sessions' |
static | $banTable = 'chatroom_bans' |
static | $privateRoomsTable = 'chatroom_prooms' |
static | $privateSessionsTable = 'chatroom_psessions' |
static | $uploadTable = 'chatroom_uploads' |
static | $privateRoomsAccessTable = 'chatroom_proomaccess' |
ilChatroom::addHistoryEntry | ( | $message, | |
$recipient = null , |
|||
$publicMessage = true |
|||
) |
Inserts entry into historyTable.
string | $message | |
string | $recipient | |
boolean | $publicMessage |
Definition at line 387 of file class.ilChatroom.php.
References $ilDB, $query, array, ilChatroomUser\getUserId(), ilChatroomUser\getUsername(), and time.
ilChatroom::addPrivateRoom | ( | $title, | |
ilChatroomUser | $owner, | ||
$settings | |||
) |
Definition at line 922 of file class.ilChatroom.php.
References $ilDB, $settings, $title, array, ilChatroomUser\getUserId(), and time.
Referenced by ilChatroomViewGUI\renderFileUploadForm().
ilChatroom::banUser | ( | $user_id, | |
$comment = '' |
|||
) |
Inserts user into banTable, using given $user_id ilDBInterface $ilDB.
integer | $user_id | |
string | $comment |
Definition at line 758 of file class.ilChatroom.php.
References $comment, $ilDB, array, and time.
|
static |
Returns ilChatroom object by given $object_id.
ilDBInterface $ilDB
integer | $object_id |
Definition at line 110 of file class.ilChatroom.php.
References $ilDB, $query, $row, and array.
Referenced by ilChatroomHistoryGUI\__construct(), ilChatroomBanGUI\active(), ilChatroomServerHandler\cleanupPrivateRooms(), ilChatroomPrivateRoomGUI\create(), ilObjChatroom\createDefaultRole(), ilChatroomPrivateRoomGUI\delete(), ilChatroomPrivateRoomGUI\enter(), ilChatroomPostMessageGUI\executeDefault(), ilChatroomInitialGUI\executeDefault(), ilChatroomKickGUI\executeDefault(), ilChatroomBanGUI\executeDefault(), ilChatroomBlockGUI\getChatroomSelectionList(), ilChatroomTabGUIFactory\getLabel(), ilChatroomGUIHandler\getRoomByObjectId(), ilObjChatroomListGUI\init(), ilChatroomInviteUsersToPrivateRoomGUI\inviteById(), ilChatroomPrivateRoomGUI\leave(), ilChatroomPrivateRoomGUI\listUsers(), ilChatroomKickGUI\main(), ilChatroomViewGUI\renderFileUploadForm(), ilChatroomKickGUI\sub(), and ilChatroomUploadFileGUI\uploadFile().
|
static |
Returns ilChatroom by given $room_id ilDBInterface $ilDB.
integer | $room_id |
Definition at line 161 of file class.ilChatroom.php.
References $ilDB, $query, $row, array, and ilObjectFactory\getInstanceByObjId().
Referenced by ilChatroomServerHandler\disconnectedUsers(), and ilContactGUI\submitInvitation().
|
static |
Checks user permissions in question for a given user id in relation to a given ref_id.
ilRbacSystem $rbacsystem ilLanguage $lng
integer | $usr_id | |
mixed | $permissions | |
integer | $ref_id |
Definition at line 84 of file class.ilChatroom.php.
References $lng, $ref_id, and array.
Referenced by ilChatroomKickGUI\sub(), and ilContactGUI\submitInvitation().
|
static |
Checks user permissions by given array and ref_id.
Rbacsystem $rbacsystem
mixed | $permissions | |
integer | $ref_id |
Definition at line 50 of file class.ilChatroom.php.
References $lng, $ref_id, array, and ilUtil\sendFailure().
Referenced by ilChatroomHistoryGUI\__construct(), ilChatroomSettingsGUI\__construct(), ilChatroomAdminViewGUI\clientsettings(), ilChatroomTabGUIFactory\convertLowerCamelCaseToUnderscoreCaseConversion(), ilChatroomPrivateRoomGUI\enter(), ilChatroomPostMessageGUI\executeDefault(), ilChatroomBanGUI\executeDefault(), ilChatroomGUIHandler\redirectIfNoPermission(), ilChatroomViewGUI\renderFileUploadForm(), ilChatroomAdminViewGUI\serversettings(), ilChatroomUploadFileGUI\uploadFile(), and ilChatroomAdminSmileyGUI\view().
ilChatroom::clearMessages | ( | $sub_room | ) |
Definition at line 1467 of file class.ilChatroom.php.
References $ilDB, array, and time.
ilChatroom::closePrivateRoom | ( | $id | ) |
Definition at line 942 of file class.ilChatroom.php.
References $ilDB, array, and time.
ilChatroom::countActiveUsers | ( | ) |
|
static |
Deletes all entrys from userTable.
ilDBInterface $ilDB
Definition at line 190 of file class.ilChatroom.php.
Referenced by ilChatroomServerHandler\serverStarted().
ilChatroom::disconnectUser | ( | $user_id | ) |
Creates userId array by given $user object and calls disconnectUsers method.
int | $user_id |
Definition at line 492 of file class.ilChatroom.php.
References array, and disconnectUsers().
ilChatroom::disconnectUsers | ( | array | $userIds | ) |
Disconnects users by deleting userdata from userTable using given userId array.
Deletes entrys from userTable, matching roomId and userId if existing and inserts userdata and disconnection time into sessionTable. ilDBInterface $ilDB
array | $userIds |
Definition at line 504 of file class.ilChatroom.php.
References $ilDB, $query, $row, array, getSetting(), and time.
Referenced by disconnectUser().
|
static |
Definition at line 202 of file class.ilChatroom.php.
References $ilDB, $query, $res, $row, array, and time.
Referenced by ilChatroomServerHandler\cleanupPrivateRooms().
ilChatroom::getActivePrivateRooms | ( | $userid | ) |
Definition at line 1134 of file class.ilChatroom.php.
References $ilDB, $query, $row, array, and listUsersInPrivateRoom().
ilChatroom::getBannedUsers | ( | ) |
Returns an multidimensional array containing userdata from users having an entry in banTable with matching roomId.
ilDBInterface $ilDB
Definition at line 831 of file class.ilChatroom.php.
References $ilDB, $query, $result, $row, array, and getRoomId().
ilChatroom::getChatURL | ( | $gui, | |
$scope_id = 0 |
|||
) |
ilCtrl $ilCtrl
<type> | $gui |
<type> | $scope_id |
Definition at line 1055 of file class.ilChatroom.php.
References $url, and ilLink\_getStaticLink().
Referenced by isOwnerOfPrivateRoom().
ilChatroom::getConnectedUsers | ( | ) |
Returns an array of connected users.
Returns an array of user objects containing all users having an entry in userTable, matching the roomId. ilDBInterface $ilDB
Definition at line 469 of file class.ilChatroom.php.
References $ilDB, $query, $row, and array.
ilChatroom::getDescription | ( | ) |
Definition at line 291 of file class.ilChatroom.php.
References ilObjectFactory\getInstanceByObjId(), and getSetting().
ilChatroom::getHistory | ( | ilDateTime | $from = null , |
ilDateTime | $to = null , |
||
$restricted_session_userid = null , |
|||
$proom_id = 0 |
|||
) |
Returns array containing history data selected from historyTable by given ilDateTime, $restricted_session_userid and matching roomId.
ilDBInterface $ilDB
ilDateTime | $from | |
ilDateTime | $to | |
integer | $restricted_session_userid |
Definition at line 638 of file class.ilChatroom.php.
References $ilDB, $ilUser, $query, $result, $row, array, and getRoomId().
ilChatroom::getLastMessages | ( | $number, | |
$chatuser = null |
|||
) |
Definition at line 1397 of file class.ilChatroom.php.
References $ilDB, $results, $row, and array.
Referenced by getLastMessagesForChatViewer().
ilChatroom::getLastMessagesForChatViewer | ( | $number, | |
$chatuser = null |
|||
) |
Definition at line 1392 of file class.ilChatroom.php.
References getLastMessages().
ilChatroom::getLastSession | ( | ilChatroomUser | $user | ) |
Returns last session from user.
Returns row from sessionTable where user_id matches userId from given $user object. ilDBInterface $ilDB
ilChatroomUser | $user |
Definition at line 876 of file class.ilChatroom.php.
References $ilDB, $query, $row, and ilChatroomUser\getUserId().
ilChatroom::getPrivateRoomSessions | ( | ilDateTime | $from = null , |
ilDateTime | $to = null , |
||
$user_id = 0 , |
|||
$room_id = 0 |
|||
) |
Definition at line 708 of file class.ilChatroom.php.
References $ilDB, $query, $result, $row, and array.
ilChatroom::getPrivateSubRooms | ( | $parent_room, | |
$user_id | |||
) |
ilChatroom::getRefIdByRoomId | ( | $room_id | ) |
Returns ref_id of given room_id ilDBInterface $ilDB.
integer | $room_id |
Definition at line 1365 of file class.ilChatroom.php.
References $ilDB, $query, $res, $row, and array.
ilChatroom::getRoomId | ( | ) |
Returns roomID from $this->roomId.
Definition at line 703 of file class.ilChatroom.php.
References $roomId.
Referenced by getBannedUsers(), getHistory(), getSessions(), isUserBanned(), ilChatroomViewGUI\renderFileUploadForm(), and unbanUser().
ilChatroom::getSessions | ( | ilChatroomUser | $user | ) |
Returns all session from user Returns all from sessionTable where user_id matches userId from given $user object.
ilDBInterface $ilDB
ilChatroomUser | $user |
Definition at line 901 of file class.ilChatroom.php.
References $ilDB, $query, $result, $row, array, and getRoomId().
ilChatroom::getSetting | ( | $name | ) |
Returns setting from $this->settings array by given name.
string | $name |
Definition at line 306 of file class.ilChatroom.php.
References settings().
Referenced by disconnectUsers(), getDescription(), getTitle(), and ilChatroomViewGUI\renderFileUploadForm().
ilChatroom::getSettings | ( | ) |
Returns $this->settings array.
Definition at line 572 of file class.ilChatroom.php.
References $settings.
ilChatroom::getTitle | ( | ) |
Definition at line 1076 of file class.ilChatroom.php.
References ilObjectFactory\getInstanceByObjId(), and getSetting().
Referenced by isOwnerOfPrivateRoom().
ilChatroom::getUniquePrivateRoomTitle | ( | $title | ) |
Definition at line 1255 of file class.ilChatroom.php.
References $ilDB, $query, $res, $row, $title, and array.
Referenced by ilChatroomViewGUI\renderFileUploadForm().
ilChatroom::initialize | ( | array | $rowdata | ) |
Sets $this->roomId by given array $rowdata and calls setSetting method foreach available setting in $this->availableSettings.
array | $rowdata |
Definition at line 131 of file class.ilChatroom.php.
References setSetting().
ilChatroom::inviteUserToPrivateRoomByLogin | ( | $login, | |
$proom_id | |||
) |
Definition at line 1104 of file class.ilChatroom.php.
References $ilDB, $query, ilObjUser\_lookupId(), and array.
ilChatroom::isAllowedToEnterPrivateRoom | ( | $chat_userid, | |
$proom_id | |||
) |
ilChatroom::isOwnerOfPrivateRoom | ( | $user_id, | |
$proom_id | |||
) |
Definition at line 953 of file class.ilChatroom.php.
References $ilDB, $lng, $query, array, ilNotificationConfig\DEFAULT_TTS, getChatURL(), ilObjectFactory\getInstanceByObjId(), getTitle(), and ilNotificationConfig\TTL_LONG.
ilChatroom::isSubscribed | ( | $chat_userid | ) |
Returns true if entry exists in userTable matching given $chat_userid and $this->roomId.
ilDBInterface $ilDB
integer | $chat_userid |
Definition at line 584 of file class.ilChatroom.php.
References $ilDB, $query, $row, and array.
Referenced by ilChatroomViewGUI\renderFileUploadForm().
ilChatroom::isUserBanned | ( | $user_id | ) |
Returns true if there's an entry in banTable matching roomId and given $user_id ilDBInterface $ilDB.
integer | $user_id |
Definition at line 806 of file class.ilChatroom.php.
References $ilDB, $query, $row, array, and getRoomId().
ilChatroom::listUsersInPrivateRoom | ( | $private_room_id | ) |
Definition at line 1162 of file class.ilChatroom.php.
References $ilDB, $query, $row, and array.
Referenced by getActivePrivateRooms().
|
static |
Definition at line 1086 of file class.ilChatroom.php.
References $ilDB, $query, $row, and array.
Referenced by ilContactGUI\inviteToChat().
|
private |
Definition at line 367 of file class.ilChatroom.php.
Referenced by saveSettings().
ilChatroom::save | ( | ) |
Saves settings using $this->settings.
Definition at line 314 of file class.ilChatroom.php.
References saveSettings(), and settings().
ilChatroom::saveFileUploadToDb | ( | $user_id, | |
$filename, | |||
$type | |||
) |
Saves information about file uploads in DB.
ilDBInterface $ilDB
integer | $user_id | |
string | $filename | |
string | $type |
Definition at line 733 of file class.ilChatroom.php.
References $filename, $ilDB, array, and time.
ilChatroom::saveSettings | ( | array | $settings | ) |
Saves settings into settingsTable using given settings array.
ilDBInterface $ilDB
array | $settings |
Definition at line 324 of file class.ilChatroom.php.
References $ilDB, array, and phpTypeToMDBType().
Referenced by save().
ilChatroom::setSetting | ( | $name, | |
$value | |||
) |
Sets given name and value as setting into $this->settings array.
string | $name | |
mixed | $value |
Definition at line 150 of file class.ilChatroom.php.
References settings().
Referenced by initialize().
ilChatroom::subscribeUserToPrivateRoom | ( | $room_id, | |
$user_id | |||
) |
Definition at line 1184 of file class.ilChatroom.php.
References $ilDB, array, time, and userIsInPrivateRoom().
ilChatroom::unbanUser | ( | $user_id | ) |
Deletes entry from banTable matching roomId and given $user_id and returns true if sucessful.
ilDBInterface $ilDB
mixed | $user_id |
Definition at line 782 of file class.ilChatroom.php.
References $ilDB, $query, array, and getRoomId().
ilChatroom::unsubscribeUserFromPrivateRoom | ( | $room_id, | |
$user_id | |||
) |
ilDBInterface $ilDB
integer | $room_id | |
integer | $user_id |
Definition at line 1222 of file class.ilChatroom.php.
References $ilDB, array, and time.
ilChatroom::userIsInPrivateRoom | ( | $room_id, | |
$user_id | |||
) |
Definition at line 1204 of file class.ilChatroom.php.
References $ilDB, $query, and array.
Referenced by subscribeUserToPrivateRoom().
|
private |
Definition at line 28 of file class.ilChatroom.php.
|
staticprivate |
Definition at line 16 of file class.ilChatroom.php.
|
staticprivate |
Definition at line 13 of file class.ilChatroom.php.
|
private |
Definition at line 42 of file class.ilChatroom.php.
|
staticprivate |
Definition at line 20 of file class.ilChatroom.php.
|
staticprivate |
Definition at line 17 of file class.ilChatroom.php.
|
staticprivate |
Definition at line 18 of file class.ilChatroom.php.
|
private |
Definition at line 40 of file class.ilChatroom.php.
Referenced by getRoomId().
|
staticprivate |
Definition at line 15 of file class.ilChatroom.php.
|
private |
Definition at line 21 of file class.ilChatroom.php.
Referenced by addPrivateRoom(), and getSettings().
|
staticprivate |
Definition at line 12 of file class.ilChatroom.php.
|
staticprivate |
Definition at line 19 of file class.ilChatroom.php.
|
staticprivate |
Definition at line 14 of file class.ilChatroom.php.