Class ilChatroomGUIHandler.
More...
◆ execute()
| ilChatroomGUIHandler::execute |
( |
string |
$method | ) |
|
◆ executeDefault()
| ilChatroomGUIHandler::executeDefault |
( |
string |
$requestedMethod | ) |
|
|
abstract |
◆ exitIfNoRoomExists()
| ilChatroomGUIHandler::exitIfNoRoomExists |
( |
?ilChatroom |
$room | ) |
|
|
protected |
Checks if a ilChatroom exists.
If not, it will send a json encoded response with success = false
Definition at line 157 of file class.ilChatroomGUIHandler.php.
References sendResponse().
Referenced by ilChatroomBanGUI\active(), ilChatroomHistoryGUI\byDay(), ilChatroomHistoryGUI\bySession(), ilChatroomBanGUI\delete(), ilChatroomClearGUI\executeDefault(), ilChatroomInviteUsersToPrivateRoomGUI\inviteById(), ilChatroomKickGUI\main(), and ilChatroomBanGUI\show().
159 if (null === $room) {
162 'reason' =>
'unknown room',
sendResponse($response, bool $isJson=false)
Sends a json encoded response and exits the php process.
◆ getRequestValue()
| ilChatroomGUIHandler::getRequestValue |
( |
string |
$key, |
|
|
Transformation |
$trafo, |
|
|
|
$default = null |
|
) |
| |
|
protected |
- Parameters
-
- Returns
- mixed|null
Definition at line 85 of file class.ilChatroomGUIHandler.php.
References ILIAS\FileDelivery\http().
Referenced by ilChatroomBanGUI\active(), ilChatroomInviteUsersToPrivateRoomGUI\byId(), ilChatroomInviteUsersToPrivateRoomGUI\byLogin(), ilChatroomHistoryGUI\bySession(), ilChatroomBanGUI\delete(), ilChatroomInfoGUI\executeDefault(), ilChatroomInviteUsersToPrivateRoomGUI\getUserList(), ilChatroomInviteUsersToPrivateRoomGUI\inviteById(), ilChatroomViewGUI\joinWithCustomName(), ilChatroomViewGUI\lostConnection(), ilChatroomKickGUI\main(), and ilChatroomViewGUI\showRoom().
87 if ($this->
http->wrapper()->query()->has(
$key)) {
88 return $this->
http->wrapper()->query()->retrieve(
$key, $trafo);
91 if ($this->
http->wrapper()->post()->has(
$key)) {
92 return $this->
http->wrapper()->post()->retrieve(
$key, $trafo);
static http()
Fetches the global http state from ILIAS.
◆ getRoomByObjectId()
| ilChatroomGUIHandler::getRoomByObjectId |
( |
int |
$objectId | ) |
|
|
protected |
◆ hasPermission()
| ilChatroomGUIHandler::hasPermission |
( |
string |
$permission | ) |
|
◆ hasRequestValue()
| ilChatroomGUIHandler::hasRequestValue |
( |
string |
$key | ) |
|
|
protected |
◆ isSuccessful()
| ilChatroomGUIHandler::isSuccessful |
( |
|
$response | ) |
|
◆ redirectIfNoPermission()
| ilChatroomGUIHandler::redirectIfNoPermission |
( |
|
$permission | ) |
|
Checks for requested permissions and redirects if the permission check failed.
- Parameters
-
| string[]|string | $permission |
Definition at line 125 of file class.ilChatroomGUIHandler.php.
References ilChatroom\checkUserPermissions(), and ROOT_FOLDER_ID.
Referenced by ilChatroomBanGUI\active(), ilChatroomClearGUI\executeDefault(), ilChatroomInfoGUI\executeDefault(), ilChatroomViewGUI\executeDefault(), ilChatroomInviteUsersToPrivateRoomGUI\inviteById(), ilChatroomViewGUI\joinWithCustomName(), ilChatroomKickGUI\main(), ilChatroomAdminViewGUI\saveClientSettings(), ilChatroomBanGUI\show(), ilChatroomHistoryGUI\showMessages(), ilChatroomViewGUI\showRoom(), and ilChatroomViewGUI\toggleAutoMessageDisplayState().
129 $this->
ilCtrl->redirectByClass(ilRepositoryGUI::class);
static checkUserPermissions($permissions, int $ref_id, bool $send_info=true)
Checks user permissions by given array and ref_id.
◆ sendResponse()
| ilChatroomGUIHandler::sendResponse |
( |
|
$response, |
|
|
bool |
$isJson = false |
|
) |
| |
Sends a json encoded response and exits the php process.
- Parameters
-
Definition at line 171 of file class.ilChatroomGUIHandler.php.
References $response, and ILIAS\FileDelivery\http().
Referenced by ilChatroomBanGUI\active(), ilChatroomPollGUI\executeDefault(), ilChatroomClearGUI\executeDefault(), exitIfNoRoomExists(), ilChatroomInviteUsersToPrivateRoomGUI\getUserList(), ilChatroomInviteUsersToPrivateRoomGUI\inviteById(), ilChatroomViewGUI\lostConnection(), and ilChatroomKickGUI\main().
173 $this->
http->saveResponse(
174 $this->
http->response()
175 ->withHeader(ResponseHeader::CONTENT_TYPE,
'application/json')
176 ->withBody(Streams::ofString($isJson ?
$response : json_encode(
$response, JSON_THROW_ON_ERROR)))
178 $this->
http->sendResponse();
179 $this->
http->close();
static http()
Fetches the global http state from ILIAS.
◆ $http
◆ $ilCtrl
◆ $ilias
| ILIAS ilChatroomGUIHandler::$ilias |
|
protected |
◆ $ilLng
◆ $ilUser
◆ $mainTpl
◆ $navigationHistory
◆ $obj_service
◆ $rbacsystem
◆ $refinery
| Refinery ilChatroomGUIHandler::$refinery |
|
protected |
◆ $tabs
◆ $tree
| ilTree ilChatroomGUIHandler::$tree |
|
protected |
◆ $uiFactory
| UIFactory ilChatroomGUIHandler::$uiFactory |
|
protected |
◆ $uiRenderer
| UIRenderer ilChatroomGUIHandler::$uiRenderer |
|
protected |
◆ $upload
◆ $webDirectory
The documentation for this class was generated from the following file: