19 declare(strict_types=1);
33 $data->user = $this->gui->getObject()->getPersonalInformation($chat_user);
34 $data->userToKick = $messageString;
35 $data->timestamp = date(
'c');
51 $connector = $this->gui->getConnector();
52 $response = $connector->sendKick($room->getRoomId(), $subRoomId, $userToKick);
56 $room->disconnectUser($userToKick);
62 public function main(): void
70 $connector = $this->gui->getConnector();
71 $response = $connector->sendKick($room->getRoomId(), $subRoomId, $userToKick);
75 $room->disconnectUser($userToKick);
84 public function sub(): void
91 !$room->isOwnerOfPrivateRoom(
92 $this->ilUser->getId(),
97 $this->
ilCtrl->redirectByClass(ilRepositoryGUI::class);
100 $roomId = $room->getRoomId();
103 if ($room->userIsInPrivateRoom($subRoomId, $userToKick)) {
104 $connector = $this->gui->getConnector();
105 $response = $connector->sendKick($roomId, $subRoomId, $userToKick);
static checkUserPermissions($permissions, int $ref_id, bool $send_info=true)
Checks user permissions by given array and ref_id.
executeDefault(string $requestedMethod)
redirectIfNoPermission($permission)
Checks for requested permissions and redirects if the permission check failed.
sub()
Kicks user from subroom into mainroom.
getRequestValue(string $key, Transformation $trafo, $default=null)
exitIfNoRoomExists(?ilChatroom $room)
Checks if a ilChatroom exists.
Class ilChatroomGUIHandler.
isSuccessful($response)
Checks for success param in an json decoded response.
sendResponse($response, bool $isJson=false)
Sends a json encoded response and exits the php process.
static byObjectId(int $object_id)
buildMessage(string $messageString, ilChatroomUser $chat_user)