ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilChatroomClearGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
29{
30 public function executeDefault(string $requestedMethod): void
31 {
32 $this->redirectIfNoPermission('moderate');
33
34 $room = $this->getRoomByObjectId($this->gui->getObject()->getId());
35 $this->exitIfNoRoomExists($room);
36
37 $chat_user = new ilChatroomUser($this->ilUser, $room);
38
39 $room->clearMessages();
40
41 $connector = $this->gui->getConnector();
42 $response = $connector->sendClearMessages($room->getRoomId(), $chat_user->getUserId());
43
44 $this->sendResponse($response, 'application/json');
45 }
46}
Class ilChatroomKickGUI.
executeDefault(string $requestedMethod)
Class ilChatroomGUIHandler.
redirectIfNoPermission($permission)
Checks for requested permissions and redirects if the permission check failed.
exitIfNoRoomExists(?ilChatroom $room)
Checks if a ilChatroom exists.
sendResponse(string $content, string $type)
Sends a response and exits the php process.
Class ilChatroomUser.
$response
Definition: xapitoken.php:93