ILIAS
release_8 Revision v8.23
|
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 (string $name, $value) | |
Sets given name and value as setting into $this->settings array. More... | |
getDescription () | |
getSetting (string $name) | |
save () | |
saveSettings (array $settings) | |
addHistoryEntry ($message) | |
connectUser (ilChatroomUser $user) | |
getConnectedUsers (bool $only_data=true) | |
disconnectUser (int $user_id) | |
disconnectUsers (array $userIds) | |
getSettings () | |
isSubscribed (int $chat_userid) | |
isAllowedToEnterPrivateRoom (int $chat_userid, int $proom_id) | |
getHistory (ilDateTime $from=null, ilDateTime $to=null, int $restricted_session_userid=null, ?int $proom_id=0, bool $respect_target=true) | |
getRoomId () | |
getPrivateRoomSessions (ilDateTime $from, ilDateTime $to, int $user_id, int $room_id) | |
saveFileUploadToDb (int $user_id, string $filename, string $type) | |
banUser (int $user_id, int $actor_id, string $comment='') | |
unbanUser ($user_id) | |
Deletes entry from banTable matching roomId and given $user_id and returns the number of affected rows. More... | |
isUserBanned (int $user_id) | |
getBannedUsers () | |
getLastSession (ilChatroomUser $user) | |
getSessions (ilChatroomUser $user) | |
addPrivateRoom (string $title, ilChatroomUser $owner, array $settings) | |
closePrivateRoom (int $id) | |
isOwnerOfPrivateRoom (int $user_id, int $proom_id) | |
getChatURL (ilChatroomObjectGUI $gui, int $scope_id=0) | |
getTitle () | |
inviteUserToPrivateRoomByLogin (string $login, int $proom_id) | |
inviteUserToPrivateRoom (int $user_id, int $proom_id) | |
getActivePrivateRooms (int $userid) | |
listUsersInPrivateRoom (int $private_room_id) | |
subscribeUserToPrivateRoom (int $room_id, int $user_id) | |
userIsInPrivateRoom (int $room_id, int $user_id) | |
unsubscribeUserFromPrivateRoom (int $room_id, int $user_id) | |
countActiveUsers () | |
getPrivateRooms () | |
getPrivilegedUsersForPrivateRoom (int $subRoomId) | |
getUniquePrivateRoomTitle (string $title) | |
getAccessibleRoomIdByTitleMap (int $user_id) | |
Fetches and returns a Array<Integer, String> of all accessible repository object chats in the main tree. More... | |
getPrivateSubRooms (int $parent_room, int $user_id) | |
getRefIdByRoomId (int $room_id) | |
getLastMessages (int $number, ilChatroomUser $chatuser) | |
clearMessages (int $sub_room) | |
Static Public Member Functions | |
static | checkUserPermissions ($permissions, int $ref_id, bool $send_info=true) |
Checks user permissions by given array and ref_id. More... | |
static | checkPermissionsOfUser (int $usr_id, $permissions, int $ref_id) |
Checks user permissions in question for a given user id in relation to a given ref_id. More... | |
static | byObjectId (int $object_id) |
static | byRoomId (int $room_id, bool $initObject=false) |
static | findDeletablePrivateRooms () |
static | lookupPrivateRoomTitle (int $proom_id) |
Data Fields | |
const | ROOM_INVITATION = 'invitation_to_room' |
Static Protected Member Functions | |
static | checkPermissions (int $usrId, int $refId, array $permissions) |
Private Member Functions | |
phpTypeToMDBType (string $type) | |
Private Attributes | |
array | $settings = [] |
array | $availableSettings |
array int | $roomId = 0 |
ilObjChatroom | $object = null |
Static Private Attributes | |
static string | $settingsTable = 'chatroom_settings' |
static string | $historyTable = 'chatroom_history' |
static string | $userTable = 'chatroom_users' |
static string | $sessionTable = 'chatroom_sessions' |
static string | $banTable = 'chatroom_bans' |
static string | $privateRoomsTable = 'chatroom_prooms' |
static string | $privateSessionsTable = 'chatroom_psessions' |
static string | $uploadTable = 'chatroom_uploads' |
static string | $privateRoomsAccessTable = 'chatroom_proomaccess' |
ilChatroom::addHistoryEntry | ( | $message | ) |
string | array | stdClass | $message |
Definition at line 360 of file class.ilChatroom.php.
References $DIC, $id, $message, $timestamp, and ILIAS\Repository\int().
ilChatroom::addPrivateRoom | ( | string | $title, |
ilChatroomUser | $owner, | ||
array | $settings | ||
) |
Definition at line 785 of file class.ilChatroom.php.
References $DIC, and ilChatroomUser\getUserId().
ilChatroom::banUser | ( | int | $user_id, |
int | $actor_id, | ||
string | $comment = '' |
||
) |
|
static |
Definition at line 173 of file class.ilChatroom.php.
Referenced by ilChatroomXMLWriter\__construct(), ilChatroomXMLParser\__construct(), ilChatroomBanGUI\active(), ilChatroomHistoryGUI\byDay(), ilChatroomHistoryGUI\bySession(), ilObjChatroom\cloneObject(), ilChatroomPrivateRoomGUI\create(), ilChatroomBanGUI\delete(), ilChatroomPrivateRoomGUI\delete(), ilChatroomPrivateRoomGUI\enter(), ilChatroomKickGUI\executeDefault(), ilChatroomViewGUI\executeDefault(), ilChatroomSettingsGUI\general(), ilObjChatroomListGUI\getProperties(), ilChatroomGUIHandler\getRoomByObjectId(), ilChatroomTabGUIFactory\getTabsForCommand(), ilChatroomInviteUsersToPrivateRoomGUI\inviteById(), ilChatroomViewGUI\invitePD(), ilChatroomViewGUI\joinWithCustomName(), ilChatroomPrivateRoomGUI\leave(), ilChatroomPrivateRoomGUI\listUsers(), ilChatroomViewGUI\lostConnection(), ilChatroomKickGUI\main(), ilChatroomCreateGUI\save(), ilChatroomBanGUI\show(), ilChatroomKickGUI\sub(), and ilChatroomViewGUI\toggleAutoMessageDisplayState().
|
static |
Definition at line 218 of file class.ilChatroom.php.
References $DIC, $query, and ilObjectFactory\getInstanceByObjId().
Referenced by ilContactGUI\submitInvitation().
|
staticprotected |
int | $usrId | |
int | $refId | |
string[] | $permissions |
Definition at line 117 of file class.ilChatroom.php.
References $DIC, ilObjChatroom\_getPublicRefId(), ilObject\_lookupObjId(), ilAccessInfo\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.
int | $usr_id | |
string|string[] | $permissions | |
int | $ref_id |
Definition at line 102 of file class.ilChatroom.php.
Referenced by ilObjChatroomGUI\executeCommand(), and ilContactGUI\submitInvitation().
|
static |
Checks user permissions by given array and ref_id.
string|string[] | $permissions | |
int | $ref_id | |
bool | $send_info |
Definition at line 75 of file class.ilChatroom.php.
Referenced by ilObjChatroomAccess\_checkGoto(), ilObjChatroomGUI\_goto(), ilChatroomTabGUIFactory\buildTabs(), ilChatroomInfoGUI\executeDefault(), ilChatroomSettingsGUI\general(), ilChatroomGUIHandler\hasPermission(), ilChatroomGUIHandler\redirectIfNoPermission(), ilChatroomAdminViewGUI\saveClientSettings(), ilChatroomViewGUI\showRoom(), ilChatroomKickGUI\sub(), and ilChatroomAdminSmileyGUI\view().
ilChatroom::clearMessages | ( | int | $sub_room | ) |
ilChatroom::closePrivateRoom | ( | int | $id | ) |
Definition at line 806 of file class.ilChatroom.php.
References $DIC.
ilChatroom::connectUser | ( | ilChatroomUser | $user | ) |
Definition at line 387 of file class.ilChatroom.php.
References $DIC, $query, $roomId, ilChatroomUser\getUserId(), and ilChatroomUser\getUsername().
Referenced by ilChatroomViewGUI\showRoom().
ilChatroom::countActiveUsers | ( | ) |
ilChatroom::disconnectUser | ( | int | $user_id | ) |
Definition at line 438 of file class.ilChatroom.php.
References disconnectUsers().
ilChatroom::disconnectUsers | ( | array | $userIds | ) |
int[] | $userIds |
Definition at line 446 of file class.ilChatroom.php.
References $DIC, $id, $query, $res, $roomId, and getSetting().
Referenced by disconnectUser().
|
static |
Definition at line 246 of file class.ilChatroom.php.
References $DIC, $query, and ILIAS\Repository\int().
ilChatroom::getAccessibleRoomIdByTitleMap | ( | int | $user_id | ) |
Fetches and returns a Array<Integer, String> of all accessible repository object chats in the main tree.
int | $user_id |
Definition at line 1154 of file class.ilChatroom.php.
References $DIC, $query, $res, and ILIAS\Repository\int().
ilChatroom::getActivePrivateRooms | ( | int | $userid | ) |
Definition at line 969 of file class.ilChatroom.php.
References $DIC, $query, $roomId, and listUsersInPrivateRoom().
Referenced by ilChatroomViewGUI\showRoom().
ilChatroom::getBannedUsers | ( | ) |
Definition at line 718 of file class.ilChatroom.php.
References $DIC, $query, $res, getRoomId(), and ILIAS\Repository\int().
ilChatroom::getChatURL | ( | ilChatroomObjectGUI | $gui, |
int | $scope_id = 0 |
||
) |
Definition at line 910 of file class.ilChatroom.php.
References $url, ilLink\_getStaticLink(), and ilObjectGUI\getObject().
Referenced by isOwnerOfPrivateRoom().
ilChatroom::getConnectedUsers | ( | bool | $only_data = true | ) |
Definition at line 421 of file class.ilChatroom.php.
References $DIC, $query, and $roomId.
Referenced by ilChatroomViewGUI\showRoom().
ilChatroom::getDescription | ( | ) |
Definition at line 287 of file class.ilChatroom.php.
References ilObjectFactory\getInstanceByObjId(), and getSetting().
ilChatroom::getHistory | ( | ilDateTime | $from = null , |
ilDateTime | $to = null , |
||
int | $restricted_session_userid = null , |
||
?int | $proom_id = 0 , |
||
bool | $respect_target = true |
||
) |
Definition at line 542 of file class.ilChatroom.php.
References $DIC, Vendor\Package\$e, $message, $query, and getRoomId().
ilChatroom::getLastMessages | ( | int | $number, |
ilChatroomUser | $chatuser | ||
) |
Definition at line 1243 of file class.ilChatroom.php.
References Vendor\Package\$a, Vendor\Package\$b, $DIC, $results, $roomId, ilChatroomUser\getUserId(), and ILIAS\Repository\int().
Referenced by ilChatroomViewGUI\showRoom().
ilChatroom::getLastSession | ( | ilChatroomUser | $user | ) |
Definition at line 748 of file class.ilChatroom.php.
References $DIC, $query, $res, and ilChatroomUser\getUserId().
ilChatroom::getPrivateRooms | ( | ) |
Definition at line 1087 of file class.ilChatroom.php.
ilChatroom::getPrivateRoomSessions | ( | ilDateTime | $from, |
ilDateTime | $to, | ||
int | $user_id, | ||
int | $room_id | ||
) |
Definition at line 624 of file class.ilChatroom.php.
References $DIC, $query, $res, and ilDateTime\getUnixTime().
ilChatroom::getPrivateSubRooms | ( | int | $parent_room, |
int | $user_id | ||
) |
int | $parent_room | |
int | $user_id |
Definition at line 1191 of file class.ilChatroom.php.
References $DIC, $query, $res, and ILIAS\Repository\int().
ilChatroom::getPrivilegedUsersForPrivateRoom | ( | int | $subRoomId | ) |
int | $subRoomId |
Definition at line 1106 of file class.ilChatroom.php.
References $DIC, $query, and ILIAS\Repository\int().
ilChatroom::getRefIdByRoomId | ( | int | $room_id | ) |
Definition at line 1216 of file class.ilChatroom.php.
References $DIC, $query, and $res.
Referenced by isOwnerOfPrivateRoom().
ilChatroom::getRoomId | ( | ) |
Definition at line 619 of file class.ilChatroom.php.
References $roomId.
Referenced by getBannedUsers(), getHistory(), getSessions(), isOwnerOfPrivateRoom(), isUserBanned(), ilChatroomViewGUI\showRoom(), and unbanUser().
ilChatroom::getSessions | ( | ilChatroomUser | $user | ) |
Definition at line 766 of file class.ilChatroom.php.
References $DIC, $query, $res, and getRoomId().
ilChatroom::getSetting | ( | string | $name | ) |
Definition at line 296 of file class.ilChatroom.php.
References $name, and ILIAS\Repository\settings().
Referenced by disconnectUsers(), getDescription(), getTitle(), and ilChatroomViewGUI\showRoom().
ilChatroom::getSettings | ( | ) |
ilChatroom::getTitle | ( | ) |
Definition at line 922 of file class.ilChatroom.php.
References ilObjectFactory\getInstanceByObjId(), and getSetting().
Referenced by isOwnerOfPrivateRoom().
ilChatroom::getUniquePrivateRoomTitle | ( | string | $title | ) |
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 196 of file class.ilChatroom.php.
References $type, ILIAS\Repository\int(), and setSetting().
ilChatroom::inviteUserToPrivateRoom | ( | int | $user_id, |
int | $proom_id | ||
) |
Definition at line 955 of file class.ilChatroom.php.
References $DIC.
Referenced by inviteUserToPrivateRoomByLogin().
ilChatroom::inviteUserToPrivateRoomByLogin | ( | string | $login, |
int | $proom_id | ||
) |
Definition at line 947 of file class.ilChatroom.php.
References ilObjUser\_lookupId(), ILIAS\Repository\int(), and inviteUserToPrivateRoom().
ilChatroom::isAllowedToEnterPrivateRoom | ( | int | $chat_userid, |
int | $proom_id | ||
) |
Definition at line 517 of file class.ilChatroom.php.
References $DIC, $query, and $res.
Referenced by ilChatroomPrivateRoomGUI\exitIfEnterRoomIsNotAllowed(), and ilChatroomViewGUI\showRoom().
ilChatroom::isOwnerOfPrivateRoom | ( | int | $user_id, |
int | $proom_id | ||
) |
Definition at line 817 of file class.ilChatroom.php.
References $DIC, $query, $res, ilLanguageFactory\_getLanguageOfUser(), ANONYMOUS_USER_ID, getChatURL(), ilObjectFactory\getInstanceByObjId(), getRefIdByRoomId(), getRoomId(), ilMail\getSalutation(), and getTitle().
Referenced by ilChatroomGUIHandler\canModerate().
ilChatroom::isSubscribed | ( | int | $chat_userid | ) |
Definition at line 503 of file class.ilChatroom.php.
References $DIC, $query, $res, and $roomId.
Referenced by ilChatroomPrivateRoomGUI\exitIfNoRoomSubscription(), and ilChatroomViewGUI\showRoom().
ilChatroom::isUserBanned | ( | int | $user_id | ) |
Definition at line 705 of file class.ilChatroom.php.
References $DIC, $query, $res, and getRoomId().
Referenced by ilChatroomViewGUI\showRoom().
ilChatroom::listUsersInPrivateRoom | ( | int | $private_room_id | ) |
int | $private_room_id |
Definition at line 999 of file class.ilChatroom.php.
References $DIC, $query, and ILIAS\Repository\int().
Referenced by getActivePrivateRooms().
|
static |
Definition at line 931 of file class.ilChatroom.php.
Referenced by ilContactGUI\inviteToChat().
|
private |
Definition at line 343 of file class.ilChatroom.php.
References $type.
Referenced by saveSettings().
ilChatroom::save | ( | ) |
Definition at line 301 of file class.ilChatroom.php.
References saveSettings(), and ILIAS\Repository\settings().
ilChatroom::saveFileUploadToDb | ( | int | $user_id, |
string | $filename, | ||
string | $type | ||
) |
ilChatroom::saveSettings | ( | array | $settings | ) |
Definition at line 306 of file class.ilChatroom.php.
References $DIC, $roomId, $type, and phpTypeToMDBType().
Referenced by save().
ilChatroom::setSetting | ( | string | $name, |
$value | |||
) |
Sets given name and value as setting into $this->settings array.
string | $name | |
mixed | $value |
Definition at line 213 of file class.ilChatroom.php.
References $name, and ILIAS\Repository\settings().
Referenced by initialize().
ilChatroom::subscribeUserToPrivateRoom | ( | int | $room_id, |
int | $user_id | ||
) |
Definition at line 1020 of file class.ilChatroom.php.
References $DIC, $id, and userIsInPrivateRoom().
Referenced by ilChatroomViewGUI\showRoom().
ilChatroom::unbanUser | ( | $user_id | ) |
Deletes entry from banTable matching roomId and given $user_id and returns the number of affected rows.
int|int[] | $user_id |
Definition at line 690 of file class.ilChatroom.php.
References $DIC, $query, and getRoomId().
ilChatroom::unsubscribeUserFromPrivateRoom | ( | int | $room_id, |
int | $user_id | ||
) |
ilChatroom::userIsInPrivateRoom | ( | int | $room_id, |
int | $user_id | ||
) |
Definition at line 1039 of file class.ilChatroom.php.
Referenced by subscribeUserToPrivateRoom().
|
private |
Definition at line 52 of file class.ilChatroom.php.
|
staticprivate |
Definition at line 40 of file class.ilChatroom.php.
|
staticprivate |
Definition at line 37 of file class.ilChatroom.php.
|
private |
Definition at line 66 of file class.ilChatroom.php.
|
staticprivate |
Definition at line 44 of file class.ilChatroom.php.
|
staticprivate |
Definition at line 41 of file class.ilChatroom.php.
|
staticprivate |
Definition at line 42 of file class.ilChatroom.php.
|
private |
Definition at line 65 of file class.ilChatroom.php.
Referenced by connectUser(), countActiveUsers(), disconnectUsers(), getActivePrivateRooms(), getConnectedUsers(), getLastMessages(), getRoomId(), isSubscribed(), and saveSettings().
|
staticprivate |
Definition at line 39 of file class.ilChatroom.php.
|
private |
Definition at line 45 of file class.ilChatroom.php.
Referenced by getSettings().
|
staticprivate |
Definition at line 36 of file class.ilChatroom.php.
|
staticprivate |
Definition at line 43 of file class.ilChatroom.php.
|
staticprivate |
Definition at line 38 of file class.ilChatroom.php.
const ilChatroom::ROOM_INVITATION = 'invitation_to_room' |
Definition at line 35 of file class.ilChatroom.php.