4require_once 
'Modules/Chatroom/classes/class.ilChatroom.php';
 
   75        $this->ilUser = 
$DIC->user();
 
   77        $this->ilLng = 
$DIC->language();
 
   78        $this->rbacsystem = 
$DIC->rbac()->system();
 
   79        $this->mainTpl = 
$DIC->ui()->mainTemplate();
 
   80        $this->upload = 
$DIC->upload();
 
   81        $this->webDirectory = 
$DIC->filesystem()->web();
 
   82        $this->
ilias = $DIC[
'ilias'];
 
   83        $this->tabs = 
$DIC->tabs();
 
   84        $this->navigationHistory = 
$DIC[
'ilNavigationHistory'];
 
   85        $this->tree = 
$DIC[
'tree'];
 
  107                    'reason' => 
'unkown room',
 
  131        if (!$this->
canModerate($room, $subRoom, $chat_user->getUserId())) {
 
  135                    'reason' => 
'not owner of private room',
 
  150        return $this->
isMainRoom($subRoom) || $room->isOwnerOfPrivateRoom($user_id, $subRoom) || $this->
hasPermission(
'moderate');
 
  159        return $subRoomId == 0;
 
  180        $this->ilLng->loadLanguageModule(
'chatroom');
 
  182        if (method_exists($this, $method)) {
 
  183            return $this->$method();
 
An exception for terminatinating execution or to throw for unit testing.
Class ilChatroomGUIHandler.
executeDefault($requestedMethod)
canModerate($room, $subRoom, $user_id)
Checks if the user has permission to moderate a ilChatroom.
hasPermission($permission)
Checks for access with ilRbacSystem.
execute($method)
Executes given $method if existing, otherwise executes executeDefault() method.
exitIfNoRoomPermission($room, $subRoom, $chat_user)
Check if user can moderate a chatroom.
__construct(ilChatroomObjectGUI $gui)
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.
getRoomByObjectId($objectId)
exitIfNoRoomExists($room)
Checks if a ilChatroom exists.
isSuccessful($response)
Checks for success param in an json decoded response.
static byObjectId($object_id)
Returns ilChatroom object by given $object_id.
static checkUserPermissions($permissions, $ref_id, $send_info=true)
Checks user permissions by given array and ref_id.
This class provides processing control methods.
setParameterByClass($a_class, $a_parameter, $a_value)
Same as setParameterByClass, except that a class name is passed.
redirectByClass($a_class, $a_cmd="", $a_anchor="", $a_asynch=false)
Redirect to other gui class using class name.
redirection script todo: (a better solution should control the processing via a xml file)