ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilChatroomInfoGUI Class Reference

Class ilChatroomInfoGUI Provides methods to prepare and display the info task. More...

+ Inheritance diagram for ilChatroomInfoGUI:
+ Collaboration diagram for ilChatroomInfoGUI:

Public Member Functions

 executeDefault ($method)
 Prepares and displays the info screen. More...
 
- Public Member Functions inherited from ilChatroomGUIHandler
 __construct (ilChatroomObjectGUI $gui)
 
 sendResponse ($response)
 Sends a json encoded response and exits the php process. More...
 
 hasPermission ($permission)
 Checks for access with ilRbacSystem. More...
 
 execute ($method)
 Executes given $method if existing, otherwise executes executeDefault() method. More...
 
 executeDefault ($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...
 

Protected Member Functions

 createInfoScreenGUI ($gui)
 
- Protected Member Functions inherited from ilChatroomGUIHandler
 getRoomByObjectId ($objectId)
 
 exitIfNoRoomExists ($room)
 Checks if a ilChatroom exists. More...
 
 exitIfNoRoomPermission ($room, $subRoom, $chat_user)
 Check if user can moderate a chatroom. More...
 
 canModerate ($room, $subRoom, $user_id)
 Checks if the user has permission to moderate a ilChatroom. More...
 
 isMainRoom ($subRoomId)
 

Additional Inherited Members

- Protected Attributes inherited from ilChatroomGUIHandler
 $gui
 
 $ilUser
 
 $ilCtrl
 
 $ilLng
 
 $webDirectory
 
 $upload
 
 $rbacsystem
 
 $mainTpl
 
 $ilias
 
 $navigationHistory
 
 $tree
 
 $tabs
 

Detailed Description

Class ilChatroomInfoGUI Provides methods to prepare and display the info task.

Author
Jan Posselt jposs.nosp@m.elt@.nosp@m.datab.nosp@m.ay.d.nosp@m.e
Version
$Id$

Definition at line 11 of file class.ilChatroomInfoGUI.php.

Member Function Documentation

◆ createInfoScreenGUI()

ilChatroomInfoGUI::createInfoScreenGUI (   $gui)
protected
Parameters
ilChatroomObjectGui$gui
Returns
ilInfoScreenGUI

Definition at line 58 of file class.ilChatroomInfoGUI.php.

References ilChatroomGUIHandler\$gui.

Referenced by executeDefault().

59  {
60  require_once 'Services/InfoScreen/classes/class.ilInfoScreenGUI.php';
61  return new ilInfoScreenGUI($gui);
62  }
Class ilInfoScreenGUI.
+ Here is the caller graph for this function:

◆ executeDefault()

ilChatroomInfoGUI::executeDefault (   $method)

Prepares and displays the info screen.

Parameters
string$method
Exceptions
ilCtrlException

Definition at line 18 of file class.ilChatroomInfoGUI.php.

References $_GET, $info, ilChatroom\checkUserPermissions(), createInfoScreenGUI(), ilCtrl\forwardCommand(), ilChatroomGUIHandler\redirectIfNoPermission(), and ilCtrl\setCmd().

19  {
20  include_once 'Modules/Chatroom/classes/class.ilChatroom.php';
21 
22  $this->redirectIfNoPermission('read');
23 
24  $this->gui->switchToVisibleMode();
25 
26  if (!ilChatroom::checkUserPermissions("visible", $this->gui->ref_id, false)) {
27  $this->gui->ilias->raiseError(
28  $this->ilLng->txt("msg_no_perm_read"),
29  $this->ilias->error_obj->MESSAGE
30  );
31  }
32 
33  $info = $this->createInfoScreenGUI($this->gui);
34 
35  $info->enablePrivateNotes();
36 
37  if (ilChatroom::checkUserPermissions("read", (int) $_GET["ref_id"], false)) {
38  $info->enableNews();
39  }
40 
41  $info->addMetaDataSections(
42  $this->gui->object->getId(),
43  0,
44  $this->gui->object->getType()
45  );
46  if (!$method) {
47  $this->ilCtrl->setCmd('showSummary');
48  } else {
49  $this->ilCtrl->setCmd($method);
50  }
51  $this->ilCtrl->forwardCommand($info);
52  }
This class provides processing control methods.
$_GET["client_id"]
redirectIfNoPermission($permission)
Checks for requested permissions and redirects if the permission check failed.
setCmd($a_cmd)
Set the current command.
static checkUserPermissions($permissions, $ref_id, $send_info=true)
Checks user permissions by given array and ref_id.
redirection script todo: (a better solution should control the processing via a xml file) ...
$info
Definition: index.php:5
forwardCommand($a_gui_object)
Forward flow of control to next gui class this invokes the executeCommand() method of the gui object ...
+ Here is the call graph for this function:

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