ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilChatroomClearGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4require_once 'Modules/Chatroom/classes/class.ilChatroom.php';
5require_once 'Modules/Chatroom/classes/class.ilChatroomUser.php';
6
15{
19 public function executeDefault($method)
20 {
21 $this->redirectIfNoPermission('moderate');
22
23 $room = $this->getRoomByObjectId($this->gui->object->getId());
24 $this->exitIfNoRoomExists($room);
25
26 $chat_user = new ilChatroomUser($this->ilUser, $room);
27 $subRoomId = $_REQUEST['sub'];
28
29 $room->clearMessages($subRoomId);
30
31 $connector = $this->gui->getConnector();
32 $response = $connector->sendClearMessages($room->getRoomId(), $subRoomId, $chat_user->getUserId());
33
34 $this->sendResponse($response);
35 }
36}
An exception for terminatinating execution or to throw for unit testing.
Class ilChatroomKickGUI.
Class ilChatroomGUIHandler.
redirectIfNoPermission($permission)
Checks for requested permissions and redirects if the permission check failed.
sendResponse($response)
Sends a json encoded response and exits the php process.
exitIfNoRoomExists($room)
Checks if a ilChatroom exists.
Class ilChatroomUser.
$response