19declare(strict_types=1);
66 $this->ilUser =
$DIC->user();
68 $this->ilLng =
$DIC->language();
69 $this->rbacsystem =
$DIC->rbac()->system();
70 $this->mainTpl =
$DIC->ui()->mainTemplate();
71 $this->
upload = $DIC->upload();
72 $this->webDirectory =
$DIC->filesystem()->web();
73 $this->obj_service =
$DIC->object();
74 $this->
ilias = $DIC[
'ilias'];
75 $this->
tabs = $DIC->tabs();
76 $this->navigationHistory =
$DIC[
'ilNavigationHistory'];
77 $this->tree =
$DIC[
'tree'];
78 $this->uiFactory =
$DIC->ui()->factory();
79 $this->uiRenderer =
$DIC->ui()->renderer();
80 $this->
http = $DIC->http();
92 if ($this->
http->wrapper()->query()->has($key)) {
93 return $this->
http->wrapper()->query()->retrieve($key, $trafo);
96 if ($this->
http->wrapper()->post()->has($key)) {
97 return $this->
http->wrapper()->post()->retrieve($key, $trafo);
105 if ($this->
http->wrapper()->query()->has($key)) {
109 return $this->
http->wrapper()->post()->has($key);
114 $this->ilLng->loadLanguageModule(
'chatroom');
116 if (method_exists($this, $method)) {
165 if (
null === $room) {
168 'reason' =>
'unknown room',
180 $this->
http->saveResponse(
181 $this->
http->response()
182 ->withHeader(ResponseHeader::CONTENT_TYPE,
'application/json')
183 ->withBody(Streams::ofString($isJson ?
$response : json_encode(
$response, JSON_THROW_ON_ERROR)))
185 $this->
http->sendResponse();
186 $this->
http->close();
200 'reason' =>
'not owner of private room',
210 $this->hasPermission(
'moderate')
216 return $subRoomId === 0;
Class ilChatroomGUIHandler.
hasRequestValue(string $key)
ilGlobalTemplateInterface $mainTpl
redirectIfNoPermission($permission)
Checks for requested permissions and redirects if the permission check failed.
getRoomByObjectId(int $objectId)
ilObjectService $obj_service
exitIfNoRoomModeratePermission(ilChatroom $room, int $subRoom, ilChatroomUser $chatUser)
Check if user can moderate a chatroom.
exitIfNoRoomExists(?ilChatroom $room)
Checks if a ilChatroom exists.
canModerate(ilChatroom $room, int $subRoom, int $usrId)
executeDefault(string $requestedMethod)
sendResponse($response, bool $isJson=false)
Sends a json encoded response and exits the php process.
ilNavigationHistory $navigationHistory
isSuccessful($response)
Checks for success param in an json decoded response.
getRequestValue(string $key, Transformation $trafo, $default=null)
hasPermission(string $permission)
isMainRoom(int $subRoomId)
getUserId()
Returns Ilias User ID.
static checkUserPermissions($permissions, int $ref_id, bool $send_info=true)
Checks user permissions by given array and ref_id.
isOwnerOfPrivateRoom(int $user_id, int $proom_id)
static byObjectId(int $object_id)
Class ilCtrl provides processing control methods.
redirectByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
@inheritDoc
setParameterByClass(string $a_class, string $a_parameter, $a_value)
@inheritDoc
Navigation History of Repository Items.
class ilRbacSystem system function like checkAccess, addActiveRole ... Supporting system functions ar...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface GlobalHttpState.
This is how the factory for UI elements looks.
An entity that renders components to a string output.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class FlySystemFileAccessTest \Provider\FlySystem @runTestsInSeparateProcesses @preserveGlobalState d...
static http()
Fetches the global http state from ILIAS.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
Class ChatMainBarProvider \MainMenu\Provider.
header include for all ilias files.