Access class for chatroom objects.  
 More...
 | 
| static  | checkRoomAccess (string $a_permission, int $a_ref_id, int $a_obj_id, int $a_user_id) | 
|   | 
Access class for chatroom objects. 
- Author
 - Jan Posselt <jposselt at databay.de> 
 
- Version
 - $Id$ \ 
 
Definition at line 27 of file class.ilObjChatroomAccess.php.
 
◆ _checkAccess()
      
        
          | ilObjChatroomAccess::_checkAccess  | 
          ( | 
          string  | 
          $cmd,  | 
        
        
           | 
           | 
          string  | 
          $permission,  | 
        
        
           | 
           | 
          int  | 
          $ref_id,  | 
        
        
           | 
           | 
          int  | 
          $obj_id,  | 
        
        
           | 
           | 
          ?int  | 
          $user_id = null  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
 
◆ _checkGoto()
  
  
      
        
          | static ilObjChatroomAccess::_checkGoto  | 
          ( | 
          string  | 
          $target | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Definition at line 40 of file class.ilObjChatroomAccess.php.
References ilChatroom\checkUserPermissions().
   42         $t_arr = explode(
'_', $target);
    44         if (count($t_arr) < 2 || $t_arr[0] !== 
'chtr' || ((
int) $t_arr[1]) <= 0) {
 static checkUserPermissions($permissions, int $ref_id, bool $send_info=true)
Checks user permissions by given array and ref_id. 
 
 
 
 
◆ _getCommands()
  
  
      
        
          | static ilObjChatroomAccess::_getCommands  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Definition at line 31 of file class.ilObjChatroomAccess.php.
Referenced by ilObjChatroomListGUI\init().
   34         $commands[] = [
'permission' => 
'read', 
'cmd' => 
'view', 
'lang_var' => 
'enter', 
'default' => 
true];
    35         $commands[] = [
'permission' => 
'write', 
'cmd' => 
'settings-general', 
'lang_var' => 
'settings'];
  
 
 
◆ canBeDelivered()
      
        
          | ilObjChatroomAccess::canBeDelivered  | 
          ( | 
          ilWACPath  | 
          $ilWACPath | ) | 
           | 
        
      
 
 
◆ checkRoomAccess()
  
  
      
        
          | static ilObjChatroomAccess::checkRoomAccess  | 
          ( | 
          string  | 
          $a_permission,  | 
         
        
           | 
           | 
          int  | 
          $a_ref_id,  | 
         
        
           | 
           | 
          int  | 
          $a_obj_id,  | 
         
        
           | 
           | 
          int  | 
          $a_user_id  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
staticprivate   | 
  
 
Definition at line 65 of file class.ilObjChatroomAccess.php.
References $DIC, and ilAccessInfo\IL_NO_OBJECT_ACCESS.
   69         if (self::$chat_enabled === null) {
    71             self::$chat_enabled = (bool) $chatSetting->get(
'chat_enabled', 
'0');
    74         $hasWriteAccess = $DIC->rbac()->system()->checkAccessOfUser($a_user_id, 
'write', $a_ref_id);
    75         if ($hasWriteAccess) {
    79         switch ($a_permission) {
    82                 $is_online = self::lookupOnline($a_obj_id);
    84                     $DIC->access()->addInfoItem(
    86                         $DIC->language()->txt(
'offline')
    93         return self::$chat_enabled;
 const IL_NO_OBJECT_ACCESS
 
 
 
 
◆ lookupOnline()
  
  
      
        
          | static ilObjChatroomAccess::lookupOnline  | 
          ( | 
          int  | 
          $a_obj_id | ) | 
           | 
         
       
   | 
  
static   | 
  
 
 
◆ $chat_enabled
  
  
      
        
          | bool ilObjChatroomAccess::$chat_enabled = null | 
         
       
   | 
  
staticprivate   | 
  
 
 
The documentation for this class was generated from the following file: