ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilChatroomClearGUI Class Reference

Class ilChatroomKickGUI. More...

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

Public Member Functions

 executeDefault (string $requestedMethod)
 
- Public Member Functions inherited from ilChatroomGUIHandler
 execute (string $method)
 
 executeDefault (string $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...
 
 hasPermission (string $permission)
 

Additional Inherited Members

- Protected Member Functions inherited from ilChatroomGUIHandler
 getRequestValue (string $key, Transformation $trafo, $default=null)
 
 hasRequestValue (string $key)
 
 getRoomByObjectId (int $objectId)
 
 exitIfNoRoomExists (?ilChatroom $room)
 Checks if a ilChatroom exists. More...
 
 sendJSONResponse ($response)
 Sends a json encoded response and exits the php process. More...
 
 sendResponse (string $content, string $type)
 Sends a response and exits the php process. More...
 
- Protected Attributes inherited from ilChatroomGUIHandler
ilObjUser $ilUser
 
ilCtrlInterface $ilCtrl
 
ilLanguage $ilLng
 
Filesystem $webDirectory
 
ilObjectService $obj_service
 
FileUpload $upload
 
ilRbacSystem $rbacsystem
 
ilGlobalTemplateInterface $mainTpl
 
ILIAS $ilias
 
ilNavigationHistory $navigationHistory
 
ilTree $tree
 
ilTabsGUI $tabs
 
UIFactory $uiFactory
 
UIRenderer $uiRenderer
 
GlobalHttpState $http
 
Refinery $refinery
 

Detailed Description

Member Function Documentation

◆ executeDefault()

ilChatroomClearGUI::executeDefault ( string  $requestedMethod)

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

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

30  : 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  }
redirectIfNoPermission($permission)
Checks for requested permissions and redirects if the permission check failed.
$response
Definition: xapitoken.php:93
exitIfNoRoomExists(?ilChatroom $room)
Checks if a ilChatroom exists.
sendResponse(string $content, string $type)
Sends a response and exits the php process.
Class ilChatroomUser.
+ Here is the call graph for this function:

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