ILIAS
trunk Revision v11.0_alpha-1831-g8615d53dadb
|
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) | |
getHistory (?ilDateTime $from=null, ?ilDateTime $to=null, ?int $restricted_session_userid=null, bool $respect_target=true) | |
getRoomId () | |
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) | |
getChatURL (ilChatroomObjectGUI $gui) | |
getTitle () | |
countActiveUsers () | |
getAccessibleRoomIdByTitleMap (int $user_id) | |
Fetches and returns a Array<Integer, String> of all accessible repository object chats in the main tree. More... | |
getRefIdByRoomId (int $room_id) | |
getLastMessages (int $number, ilChatroomUser $chatuser) | |
clearMessages () | |
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) |
Data Fields | |
const | ROOM_INVITATION = 'invitation_to_room' |
Static Protected Member Functions | |
static | checkPermissions (int $usr_id, int $ref_id, 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' |
ilChatroom::addHistoryEntry | ( | $message | ) |
string | array | stdClass | $message |
Definition at line 266 of file class.ilChatroom.php.
References $DIC, $id, $message, $timestamp, ILIAS\Repository\int(), ilDBConstants\T_INTEGER, and ilDBConstants\T_TEXT.
ilChatroom::banUser | ( | int | $user_id, |
int | $actor_id, | ||
string | $comment = '' |
||
) |
Definition at line 474 of file class.ilChatroom.php.
References $comment, $DIC, ilDBConstants\T_INTEGER, and ilDBConstants\T_TEXT.
|
static |
Definition at line 129 of file class.ilChatroom.php.
References $DIC, null, and ilDBConstants\T_INTEGER.
Referenced by ilChatroomXMLWriter\__construct(), ilChatroomXMLParser\__construct(), ilChatroomBanGUI\active(), ilObjChatroomGUI\afterImport(), ilChatroomHistoryGUI\byDayExport(), ilObjChatroom\cloneObject(), ilChatroomBanGUI\delete(), ilChatroomViewGUI\executeDefault(), ilChatroomSettingsGUI\general(), ilObjChatroomListGUI\getProperties(), ilChatroomGUIHandler\getRoomByObjectId(), ilChatroomTabGUIFactory\getTabsForCommand(), ilChatroomInviteUsersToPrivateRoomGUI\inviteById(), ilChatroomViewGUI\joinWithCustomName(), ilChatroomKickGUI\main(), ilChatroomSettingsGUI\saveGeneral(), ilChatroomBanGUI\show(), and ilChatroomViewGUI\toggleAutoMessageDisplayState().
|
static |
Definition at line 172 of file class.ilChatroom.php.
References $DIC, ilObjectFactory\getInstanceByObjId(), null, and ilDBConstants\T_INTEGER.
Referenced by ilContactGUI\inviteToChat(), and ilContactGUI\submitInvitation().
|
staticprotected |
string[] | $permissions |
Definition at line 100 of file class.ilChatroom.php.
References $DIC, ilObjChatroom\_getPublicRefId(), ilObjectAccess\_isOffline(), and ilObject\_lookupObjId().
|
static |
Checks user permissions in question for a given user id in relation to a given ref_id.
string|string[] | $permissions |
Definition at line 88 of file class.ilChatroom.php.
Referenced by ilObjChatroomGUI\executeCommand(), ilContactGUI\submitInvitation(), and ilChatroomViewGUI\userEntry().
|
static |
Checks user permissions by given array and ref_id.
string|string[] | $permissions |
Definition at line 64 of file class.ilChatroom.php.
Referenced by ilObjChatroomAccess\_checkGoto(), ilObjChatroomGUI\_goto(), ilChatroomTabGUIFactory\buildTabs(), ilChatroomSettingsGUI\general(), ilChatroomGUIHandler\hasPermission(), ilObjChatroomGUI\infoScreen(), ilChatroomGUIHandler\redirectIfNoPermission(), ilChatroomAdminViewGUI\saveClientSettings(), ilChatroomSettingsGUI\saveGeneral(), and ilChatroomViewGUI\showRoom().
ilChatroom::clearMessages | ( | ) |
ilChatroom::connectUser | ( | ilChatroomUser | $user | ) |
Definition at line 289 of file class.ilChatroom.php.
References $DIC, $roomId, ilChatroomUser\getUserId(), ilChatroomUser\getUsername(), ilChatroomUser\isProfilePictureVisible(), ilDBConstants\T_INTEGER, and ilDBConstants\T_TEXT.
Referenced by ilChatroomViewGUI\showRoom().
ilChatroom::countActiveUsers | ( | ) |
Definition at line 674 of file class.ilChatroom.php.
References $DIC, $res, $roomId, and ilDBConstants\T_INTEGER.
ilChatroom::disconnectUser | ( | int | $user_id | ) |
Definition at line 341 of file class.ilChatroom.php.
References disconnectUsers().
ilChatroom::disconnectUsers | ( | array | $userIds | ) |
int[] | $userIds |
Definition at line 349 of file class.ilChatroom.php.
References $DIC, $id, $res, $roomId, getSetting(), ilDBConstants\T_INTEGER, and ilDBConstants\T_TEXT.
Referenced by disconnectUser().
ilChatroom::getAccessibleRoomIdByTitleMap | ( | int | $user_id | ) |
Fetches and returns a Array<Integer, String> of all accessible repository object chats in the main tree.
Definition at line 694 of file class.ilChatroom.php.
References $DIC, $res, ILIAS\Repository\int(), ilDBConstants\T_INTEGER, and ilDBConstants\T_TEXT.
ilChatroom::getBannedUsers | ( | ) |
Definition at line 525 of file class.ilChatroom.php.
References $DIC, $res, getRoomId(), ILIAS\Repository\int(), and ilDBConstants\T_INTEGER.
ilChatroom::getChatURL | ( | ilChatroomObjectGUI | $gui | ) |
Definition at line 660 of file class.ilChatroom.php.
References ilLink\_getStaticLink(), and ilObjectGUI\getObject().
Referenced by getSessions().
ilChatroom::getConnectedUsers | ( | bool | $only_data = true | ) |
Definition at line 324 of file class.ilChatroom.php.
References $DIC, $roomId, and ilDBConstants\T_INTEGER.
Referenced by ilChatroomViewGUI\showRoom().
ilChatroom::getDescription | ( | ) |
Definition at line 197 of file class.ilChatroom.php.
References ilObjectFactory\getInstanceByObjId(), and getSetting().
ilChatroom::getHistory | ( | ?ilDateTime | $from = null , |
?ilDateTime | $to = null , |
||
?int | $restricted_session_userid = null , |
||
bool | $respect_target = true |
||
) |
Definition at line 406 of file class.ilChatroom.php.
References $DIC, $message, getRoomId(), null, and ilDBConstants\T_INTEGER.
ilChatroom::getLastMessages | ( | int | $number, |
ilChatroomUser | $chatuser | ||
) |
Definition at line 753 of file class.ilChatroom.php.
References Vendor\Package\$a, Vendor\Package\$b, $DIC, $results, ilChatroomUser\getUserId(), ILIAS\Repository\int(), and ilDBConstants\T_INTEGER.
Referenced by ilChatroomViewGUI\showRoom().
ilChatroom::getLastSession | ( | ilChatroomUser | $user | ) |
Definition at line 555 of file class.ilChatroom.php.
References $DIC, $res, ilChatroomUser\getUserId(), null, and ilDBConstants\T_INTEGER.
ilChatroom::getRefIdByRoomId | ( | int | $room_id | ) |
Definition at line 726 of file class.ilChatroom.php.
References $DIC, $res, and ilDBConstants\T_INTEGER.
Referenced by getSessions().
ilChatroom::getRoomId | ( | ) |
Definition at line 469 of file class.ilChatroom.php.
References $roomId.
Referenced by getBannedUsers(), getHistory(), getSessions(), isUserBanned(), ilChatroomViewGUI\showRoom(), and unbanUser().
ilChatroom::getSessions | ( | ilChatroomUser | $user | ) |
Definition at line 573 of file class.ilChatroom.php.
References $DIC, $res, ilLanguageFactory\_getLanguageOfUser(), ANONYMOUS_USER_ID, getChatURL(), ilObjectFactory\getInstanceByObjId(), getRefIdByRoomId(), getRoomId(), ilMail\getSalutation(), getTitle(), and ilDBConstants\T_INTEGER.
ilChatroom::getSetting | ( | string | $name | ) |
Definition at line 206 of file class.ilChatroom.php.
References ILIAS\Repository\settings().
Referenced by disconnectUsers(), getDescription(), getTitle(), and ilChatroomViewGUI\showRoom().
ilChatroom::getSettings | ( | ) |
Definition at line 387 of file class.ilChatroom.php.
References $settings.
Referenced by ilChatroomViewGUI\readOnlyChatWindow(), and ilChatroomViewGUI\showRoom().
ilChatroom::getTitle | ( | ) |
Definition at line 665 of file class.ilChatroom.php.
References ilObjectFactory\getInstanceByObjId(), and getSetting().
Referenced by getSessions().
ilChatroom::initialize | ( | array | $rowdata | ) |
Sets $this->roomId by given array $rowdata and calls setSetting method foreach available setting in $this->availableSettings.
Definition at line 151 of file class.ilChatroom.php.
References ILIAS\Repository\int(), and setSetting().
ilChatroom::isSubscribed | ( | int | $chat_userid | ) |
Definition at line 392 of file class.ilChatroom.php.
References $DIC, $res, $roomId, and ilDBConstants\T_INTEGER.
Referenced by ilChatroomViewGUI\showRoom().
ilChatroom::isUserBanned | ( | int | $user_id | ) |
Definition at line 512 of file class.ilChatroom.php.
References $DIC, $res, $user_id, getRoomId(), and ilDBConstants\T_INTEGER.
Referenced by ilChatroomViewGUI\showRoom().
|
private |
Definition at line 254 of file class.ilChatroom.php.
References ilDBConstants\T_INTEGER, and ilDBConstants\T_TEXT.
Referenced by saveSettings().
ilChatroom::save | ( | ) |
Definition at line 211 of file class.ilChatroom.php.
References saveSettings(), and ILIAS\Repository\settings().
ilChatroom::saveSettings | ( | array | $settings | ) |
Definition at line 216 of file class.ilChatroom.php.
References $DIC, $roomId, phpTypeToMDBType(), ilDBConstants\T_INTEGER, and ilDBConstants\T_TEXT.
Referenced by save().
ilChatroom::setSetting | ( | string | $name, |
$value | |||
) |
Sets given name and value as setting into $this->settings array.
mixed | $value |
Definition at line 167 of file class.ilChatroom.php.
References ILIAS\Repository\settings().
Referenced by initialize().
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 497 of file class.ilChatroom.php.
References $DIC, $user_id, getRoomId(), and ilDBConstants\T_INTEGER.
|
private |
Definition at line 48 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 58 of file class.ilChatroom.php.
|
private |
Definition at line 57 of file class.ilChatroom.php.
Referenced by connectUser(), countActiveUsers(), disconnectUsers(), getConnectedUsers(), getRoomId(), isSubscribed(), and saveSettings().
|
staticprivate |
Definition at line 39 of file class.ilChatroom.php.
|
private |
Definition at line 41 of file class.ilChatroom.php.
Referenced by getSettings().
|
staticprivate |
Definition at line 36 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.