4 require_once
'Modules/Chatroom/classes/class.ilChatroom.php';
73 'reason' =>
'unkown room',
85 echo json_encode($response);
97 if(!$this->
canModerate($room, $subRoom, $chat_user->getUserId()))
102 'reason' =>
'not owner of private room',
117 return $this->
isMainRoom($subRoom) || $room->isOwnerOfPrivateRoom($user_id, $subRoom) || $this->
hasPermission(
'moderate');
126 return $subRoomId == 0;
136 return $this->rbacsystem->checkAccess($permission, $this->gui->ref_id);
147 $this->ilLng->loadLanguageModule(
'chatroom');
149 if(method_exists($this, $method))
151 return $this->$method();
185 $response = json_decode($response,
true);
187 return $response !== null && array_key_exists(
'success', $response) && $response[
'success'];
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.