ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilChatroomClearGUI Class Reference

Class ilChatroomKickGUI. More...

+ Inheritance diagram for ilChatroomClearGUI:
+ Collaboration diagram for ilChatroomClearGUI:

Public Member Functions

 executeDefault ($method)
 {} More...
 
- Public Member Functions inherited from ilChatroomGUIHandler
 __construct (ilChatroomObjectGUI $gui)
 
 sendResponse ($response)
 Sends a json encoded response and exits the php process. More...
 
 hasPermission ($permission)
 Checks for access with ilRbacSystem. More...
 
 execute ($method)
 Executes given $method if existing, otherwise executes executeDefault() method. More...
 
 executeDefault ($requestedMethod)
 
 redirectIfNoPermission ($permission)
 Checks for requested permissions and redirects if the permission check failed. More...
 
 isSuccessful ($response)
 Checks for success param in an json decoded response. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ilChatroomGUIHandler
 getRoomByObjectId ($objectId)
 
 exitIfNoRoomExists ($room)
 Checks if a ilChatroom exists. More...
 
 exitIfNoRoomPermission ($room, $subRoom, $chat_user)
 Check if user can moderate a chatroom. More...
 
 canModerate ($room, $subRoom, $user_id)
 Checks if the user has permission to moderate a ilChatroom. More...
 
 isMainRoom ($subRoomId)
 
- Protected Attributes inherited from ilChatroomGUIHandler
 $gui
 
 $ilUser
 
 $ilCtrl
 
 $ilLng
 
 $webDirectory
 
 $upload
 
 $rbacsystem
 
 $mainTpl
 
 $ilias
 
 $navigationHistory
 
 $tree
 
 $tabs
 

Detailed Description

Member Function Documentation

◆ executeDefault()

ilChatroomClearGUI::executeDefault (   $method)

{}

Definition at line 19 of file class.ilChatroomClearGUI.php.

References $response, ilChatroomGUIHandler\exitIfNoRoomExists(), ilChatroomGUIHandler\getRoomByObjectId(), ilChatroomGUIHandler\redirectIfNoPermission(), and ilChatroomGUIHandler\sendResponse().

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  }
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
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: