ILIAS  release_8 Revision v8.25
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 $subRoomId = $this->getRequestValue('sub', $this->refinery->kindlyTo()->int());
39
40 $room->clearMessages($subRoomId);
41
42 $connector = $this->gui->getConnector();
43 $response = $connector->sendClearMessages($room->getRoomId(), $subRoomId, $chat_user->getUserId());
44
45 $this->sendResponse($response);
46 }
47}
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($response, bool $isJson=false)
Sends a json encoded response and exits the php process.
getRequestValue(string $key, Transformation $trafo, $default=null)
Class ilChatroomUser.
$response