ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
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... | |
connectUser (ilChatroomUser $user) | |
Connects user by inserting userdata into userTable. More... | |
getConnectedUsers ($only_data=true) | |
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, $respect_target=true) | |
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, $actor_id, $comment='') | |
Inserts user into banTable, using given $user_id. 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. 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) | |
getTitle () | |
inviteUserToPrivateRoomByLogin ($login, $proom_id) | |
inviteUserToPrivateRoom ($user_id, $proom_id) | |
getActivePrivateRooms ($userid) | |
listUsersInPrivateRoom ($private_room_id) | |
subscribeUserToPrivateRoom ($room_id, $user_id) | |
userIsInPrivateRoom ($room_id, $user_id) | |
unsubscribeUserFromPrivateRoom ($room_id, $user_id) | |
countActiveUsers () | |
getPrivateRooms () | |
getPrivilegedUsersForPrivateRoom ($subRoomId) | |
getUniquePrivateRoomTitle ($title) | |
getAllRooms ($user_id) | |
Fetches and returns the object ids of all rooms accessible by the user with $user_id. More... | |
getPrivateSubRooms ($parent_room, $user_id) | |
getRefIdByRoomId ($room_id) | |
Returns ref_id of given room_id. 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. More... | |
static | disconnectAllUsersFromAllRooms () |
Deletes all entrys from userTable. More... | |
static | findDeletablePrivateRooms () |
static | getUntrashedChatReferences ($filter=array()) |
static | lookupPrivateRoomTitle ($proom_id) |
Static Protected Member Functions | |
static | checkPermissions ($usrId, $refId, array $permissions) |
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 401 of file class.ilChatroom.php.
References $DIC, $id, $message, $timestamp, array, and time.
ilChatroom::addPrivateRoom | ( | $title, | |
ilChatroomUser | $owner, | ||
$settings | |||
) |
Definition at line 909 of file class.ilChatroom.php.
References $DIC, $settings, $title, array, ilChatroomUser\getUserId(), and time.
Referenced by ilChatroomViewGUI\renderFileUploadForm().
ilChatroom::banUser | ( | $user_id, | |
$actor_id, | |||
$comment = '' |
|||
) |
Inserts user into banTable, using given $user_id.
integer | $user_id | |
integer | $actor_id | |
string | $comment |
Definition at line 758 of file class.ilChatroom.php.
References $comment, $DIC, array, and time.
|
static |
Returns ilChatroom object by given $object_id.
integer | $object_id |
Definition at line 149 of file class.ilChatroom.php.
References $DIC, $query, $row, and array.
Referenced by ilChatroomHistoryGUI\__construct(), ilChatroomXMLWriter\__construct(), ilChatroomXMLParser\__construct(), ilChatroomBanGUI\active(), ilChatroomServerHandler\cleanupPrivateRooms(), ilObjChatroom\cloneObject(), ilChatroomPrivateRoomGUI\create(), ilChatroomBanGUI\delete(), ilChatroomPrivateRoomGUI\delete(), ilChatroomPrivateRoomGUI\enter(), ilChatroomPostMessageGUI\executeDefault(), ilChatroomInitialGUI\executeDefault(), ilChatroomKickGUI\executeDefault(), ilChatroomBlockGUI\getChatroomSelectionList(), ilObjChatroomListGUI\getProperties(), ilChatroomBlock\getReadableAreas(), ilChatroomGUIHandler\getRoomByObjectId(), ilChatroomTabGUIFactory\getTabsForCommand(), ilChatroomInviteUsersToPrivateRoomGUI\inviteById(), ilChatroomPrivateRoomGUI\leave(), ilChatroomPrivateRoomGUI\listUsers(), ilChatroomKickGUI\main(), ilChatroomViewGUI\renderFileUploadForm(), ilChatroomCreateGUI\save(), ilChatroomBanGUI\show(), ilChatroomKickGUI\sub(), and ilChatroomUploadFileGUI\uploadFile().
|
static |
Returns ilChatroom by given $room_id.
integer | $room_id |
Definition at line 197 of file class.ilChatroom.php.
References $DIC, $query, $row, array, and ilObjectFactory\getInstanceByObjId().
Referenced by ilChatroomServerHandler\disconnectedUsers(), and ilContactGUI\submitInvitation().
|
staticprotected |
int | $usrId | |
int | $refId | |
array | $permissions |
Definition at line 93 of file class.ilChatroom.php.
References $DIC, $GLOBALS, ilObjChatroom\_getPublicRefId(), ilObject\_lookupObjId(), IL_NO_OBJECT_ACCESS, and ilObjChatroomAccess\isActivated().
|
static |
Checks user permissions in question for a given user id in relation to a given ref_id.
integer | $usr_id | |
array | string | $permissions | |
integer | $ref_id |
Definition at line 78 of file class.ilChatroom.php.
References array.
Referenced by ilContactGUI\submitInvitation().
|
static |
Checks user permissions by given array and ref_id.
string | array | $permissions | |
integer | $ref_id | |
bool | $send_info |
Definition at line 52 of file class.ilChatroom.php.
References $DIC, array, and ilUtil\sendFailure().
Referenced by ilChatroomInfoGUI\__construct(), ilChatroomSettingsGUI\__construct(), ilObjChatroomGUI\_goto(), ilChatroomTabGUIFactory\buildTabs(), ilChatroomAdminViewGUI\clientsettings(), ilChatroomInitialGUI\executeDefault(), ilChatroomBlockGUI\getChatroomSelectionList(), ilChatroomBlock\getReadableAreas(), ilChatroomGUIHandler\hasPermission(), ilChatroomGUIHandler\redirectIfNoPermission(), ilChatroomAdminViewGUI\serversettings(), ilChatroomKickGUI\sub(), and ilChatroomAdminSmileyGUI\view().
ilChatroom::clearMessages | ( | $sub_room | ) |
Definition at line 1439 of file class.ilChatroom.php.
References $DIC, array, and time.
ilChatroom::closePrivateRoom | ( | $id | ) |
Definition at line 930 of file class.ilChatroom.php.
References $DIC, $id, array, and time.
ilChatroom::connectUser | ( | ilChatroomUser | $user | ) |
Connects user by inserting userdata into userTable.
Checks if user is already connected by using the given $user object for selecting the userId from userTable. If no entry is found, matching userId and roomId, the userdata is inserted into the userTable to connect the user.
ilChatroomUser | $user |
Definition at line 437 of file class.ilChatroom.php.
References $DIC, $query, $userdata, array, ilChatroomUser\getUserId(), ilChatroomUser\getUsername(), and time.
ilChatroom::countActiveUsers | ( | ) |
|
static |
Deletes all entrys from userTable.
Definition at line 223 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 500 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.
array | $userIds |
Definition at line 511 of file class.ilChatroom.php.
References $DIC, $id, $query, $row, array, getSetting(), and time.
Referenced by disconnectUser().
|
static |
Definition at line 235 of file class.ilChatroom.php.
References $DIC, $query, $row, array, and time.
Referenced by ilChatroomServerHandler\cleanupPrivateRooms().
ilChatroom::getActivePrivateRooms | ( | $userid | ) |
Definition at line 1091 of file class.ilChatroom.php.
References $DIC, $query, $row, $userid, array, and listUsersInPrivateRoom().
ilChatroom::getAllRooms | ( | $user_id | ) |
ilChatroom::getBannedUsers | ( | ) |
Returns an multidimensional array containing userdata from users having an entry in banTable with matching roomId.
Definition at line 827 of file class.ilChatroom.php.
References $DIC, $query, $result, $row, $userdata, array, and getRoomId().
ilChatroom::getChatURL | ( | $gui, | |
$scope_id = 0 |
|||
) |
$gui | ||
integer | $scope_id |
Definition at line 1028 of file class.ilChatroom.php.
References $url, and ilLink\_getStaticLink().
Referenced by isOwnerOfPrivateRoom().
ilChatroom::getConnectedUsers | ( | $only_data = true | ) |
Returns an array of connected users.
Returns an array of user objects containing all users having an entry in userTable, matching the roomId.
bool | $only_data |
Definition at line 478 of file class.ilChatroom.php.
References $DIC, $query, $row, $users, and array.
ilChatroom::getDescription | ( | ) |
Definition at line 317 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 , |
|||
$respect_target = true |
|||
) |
Returns array containing history data selected from historyTable by given ilDateTime, $restricted_session_userid and matching roomId.
ilDateTime | $from | |
ilDateTime | $to | |
integer | $restricted_session_userid | |
bool | $respect_target |
Definition at line 637 of file class.ilChatroom.php.
References $DIC, $from, $message, $query, $result, $row, array, and getRoomId().
ilChatroom::getLastMessages | ( | $number, | |
$chatuser = null |
|||
) |
Definition at line 1377 of file class.ilChatroom.php.
References $DIC, $results, $row, and array.
Referenced by getLastMessagesForChatViewer().
ilChatroom::getLastMessagesForChatViewer | ( | $number, | |
$chatuser = null |
|||
) |
Definition at line 1372 of file class.ilChatroom.php.
References getLastMessages().
Referenced by ilChatroomBlock\getMessages().
ilChatroom::getLastSession | ( | ilChatroomUser | $user | ) |
Returns last session from user.
Returns row from sessionTable where user_id matches userId from given $user object.
ilChatroomUser | $user |
Definition at line 866 of file class.ilChatroom.php.
References $DIC, $query, $row, and ilChatroomUser\getUserId().
ilChatroom::getPrivateRooms | ( | ) |
ilChatroom::getPrivateRoomSessions | ( | ilDateTime | $from = null , |
ilDateTime | $to = null , |
||
$user_id = 0 , |
|||
$room_id = 0 |
|||
) |
Definition at line 710 of file class.ilChatroom.php.
References $DIC, $from, $query, $result, $row, and array.
ilChatroom::getPrivateSubRooms | ( | $parent_room, | |
$user_id | |||
) |
ilChatroom::getPrivilegedUsersForPrivateRoom | ( | $subRoomId | ) |
ilChatroom::getRefIdByRoomId | ( | $room_id | ) |
ilChatroom::getRoomId | ( | ) |
Returns roomID from $this->roomId.
Definition at line 705 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.
ilChatroomUser | $user |
Definition at line 889 of file class.ilChatroom.php.
References $DIC, $query, $result, $row, array, and getRoomId().
ilChatroom::getSetting | ( | $name | ) |
Returns setting from $this->settings array by given name.
string | $name |
Definition at line 331 of file class.ilChatroom.php.
References $name, and settings().
Referenced by disconnectUsers(), getDescription(), ilChatroomBlock\getMessages(), getTitle(), and ilChatroomViewGUI\renderFileUploadForm().
ilChatroom::getSettings | ( | ) |
Returns $this->settings array.
Definition at line 570 of file class.ilChatroom.php.
References $settings.
ilChatroom::getTitle | ( | ) |
Definition at line 1045 of file class.ilChatroom.php.
References ilObjectFactory\getInstanceByObjId(), and getSetting().
Referenced by isOwnerOfPrivateRoom().
ilChatroom::getUniquePrivateRoomTitle | ( | $title | ) |
Definition at line 1246 of file class.ilChatroom.php.
References $DIC, $i, $query, $row, $title, and array.
Referenced by ilChatroomViewGUI\renderFileUploadForm().
|
static |
Definition at line 276 of file class.ilChatroom.php.
References $DIC, $query, $res, $row, and array.
Referenced by ilChatroomBlock\getReadableAreas().
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 170 of file class.ilChatroom.php.
References $type, and setSetting().
ilChatroom::inviteUserToPrivateRoom | ( | $user_id, | |
$proom_id | |||
) |
int | $user_id | |
int | $proom_id |
Definition at line 1081 of file class.ilChatroom.php.
Referenced by inviteUserToPrivateRoomByLogin(), and ilChatroomViewGUI\renderFileUploadForm().
ilChatroom::inviteUserToPrivateRoomByLogin | ( | $login, | |
$proom_id | |||
) |
Definition at line 1071 of file class.ilChatroom.php.
References ilObjUser\_lookupId(), and inviteUserToPrivateRoom().
ilChatroom::isAllowedToEnterPrivateRoom | ( | $chat_userid, | |
$proom_id | |||
) |
ilChatroom::isOwnerOfPrivateRoom | ( | $user_id, | |
$proom_id | |||
) |
Definition at line 941 of file class.ilChatroom.php.
References $DIC, $query, ilLanguageFactory\_getLanguageOfUser(), array, ilNotificationConfig\DEFAULT_TTS, getChatURL(), ilObjectFactory\getInstanceByObjId(), ilMail\getSalutation(), getTitle(), and ilNotificationConfig\TTL_LONG.
ilChatroom::isSubscribed | ( | $chat_userid | ) |
Returns true if entry exists in userTable matching given $chat_userid and $this->roomId.
integer | $chat_userid |
Definition at line 581 of file class.ilChatroom.php.
References $DIC, $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.
integer | $user_id |
Definition at line 804 of file class.ilChatroom.php.
References $DIC, $query, $row, array, and getRoomId().
ilChatroom::listUsersInPrivateRoom | ( | $private_room_id | ) |
Definition at line 1118 of file class.ilChatroom.php.
References $DIC, $query, $row, $users, and array.
Referenced by getActivePrivateRooms().
|
static |
Definition at line 1054 of file class.ilChatroom.php.
References $DIC, $query, $row, and array.
Referenced by ilContactGUI\inviteToChat().
|
private |
Definition at line 384 of file class.ilChatroom.php.
References $type.
Referenced by saveSettings().
ilChatroom::save | ( | ) |
Saves settings using $this->settings.
Definition at line 339 of file class.ilChatroom.php.
References saveSettings(), and settings().
ilChatroom::saveFileUploadToDb | ( | $user_id, | |
$filename, | |||
$type | |||
) |
Saves information about file uploads in DB.
integer | $user_id | |
string | $filename | |
string | $type |
Definition at line 733 of file class.ilChatroom.php.
References $DIC, $filename, $type, array, and time.
ilChatroom::saveSettings | ( | array | $settings | ) |
Saves settings into settingsTable using given settings array.
array | $settings |
Definition at line 348 of file class.ilChatroom.php.
References $DIC, $type, 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 187 of file class.ilChatroom.php.
References $name, and settings().
Referenced by initialize().
ilChatroom::subscribeUserToPrivateRoom | ( | $room_id, | |
$user_id | |||
) |
Definition at line 1139 of file class.ilChatroom.php.
References $DIC, $id, array, time, and userIsInPrivateRoom().
ilChatroom::unbanUser | ( | $user_id | ) |
Deletes entry from banTable matching roomId and given $user_id and returns true if sucessful.
mixed | $user_id |
Definition at line 782 of file class.ilChatroom.php.
References $DIC, $query, array, and getRoomId().
ilChatroom::unsubscribeUserFromPrivateRoom | ( | $room_id, | |
$user_id | |||
) |
integer | $room_id | |
integer | $user_id |
Definition at line 1176 of file class.ilChatroom.php.
References $DIC, array, and time.
ilChatroom::userIsInPrivateRoom | ( | $room_id, | |
$user_id | |||
) |
Definition at line 1158 of file class.ilChatroom.php.
References $DIC, $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 43 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 41 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.