4 require_once
'Modules/Chatroom/classes/class.ilChatroom.php';
52 $this->ilUser = $DIC->user();
53 $this->
ilCtrl = $DIC->ctrl();
54 $this->ilLng = $DIC->language();
55 $this->upload = $DIC->upload();
56 $this->webDirectory = $DIC->filesystem()->web();
78 'reason' =>
'unkown room',
102 if (!$this->
canModerate($room, $subRoom, $chat_user->getUserId())) {
106 'reason' =>
'not owner of private room',
121 return $this->
isMainRoom($subRoom) || $room->isOwnerOfPrivateRoom($user_id, $subRoom) || $this->
hasPermission(
'moderate');
130 return $subRoomId == 0;
151 $this->ilLng->loadLanguageModule(
'chatroom');
153 if (method_exists($this, $method)) {
154 return $this->$method();
This class provides processing control methods.
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.
executeDefault($requestedMethod)
getRoomByObjectId($objectId)
exitIfNoRoomExists($room)
Checks if a ilChatroom exists.
hasPermission($permission)
Checks for access with ilRbacSystem.
execute($method)
Executes given $method if existing, otherwise executes executeDefault() method.
canModerate($room, $subRoom, $user_id)
Checks if the user has permission to moderate a ilChatroom.
static checkUserPermissions($permissions, $ref_id, $send_info=true)
Checks user permissions by given array and ref_id.
redirectByClass($a_class, $a_cmd="", $a_anchor="", $a_asynch=false)
Redirect to other gui class using class name.
Class ilChatroomGUIHandler.
isSuccessful($response)
Checks for success param in an json decoded response.
Create styles array
The data for the language used.
setParameterByClass($a_class, $a_parameter, $a_value)
Same as setParameterByClass, except that a class name is passed.
exitIfNoRoomPermission($room, $subRoom, $chat_user)
Check if user can moderate a chatroom.
__construct(ilChatroomObjectGUI $gui)
static byObjectId($object_id)
Returns ilChatroom object by given $object_id.