ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilObjChatroomAdminGUI.php
Go to the documentation of this file.
1 <?php
2 
3 require_once 'Services/Object/classes/class.ilObjectGUI.php';
4 require_once 'Modules/Chatroom/classes/class.ilObjChatroom.php';
5 require_once 'Modules/Chatroom/classes/class.ilObjChatroomAccess.php';
6 require_once 'Modules/Chatroom/classes/class.ilChatroomObjectGUI.php';
7 
19 {
26  public function __construct($a_data = null, $a_id = null, $a_call_by_reference = true)
27  {
31  global $lng;
32 
33  $lng->loadLanguageModule('chatroom_adm');
34 
35  if($a_data == null)
36  {
37  if($_GET['serverInquiry'])
38  {
39  require_once dirname(__FILE__) . '/class.ilChatroomServerHandler.php';
41  return;
42  }
43  }
44 
45  $this->type = 'chta';
46  parent::__construct($a_data, $a_id, $a_call_by_reference, false);
47  }
48 
54  protected function getObjectDefinition()
55  {
57  'Chatroom', 'admintasks'
58  );
59  }
60 
65  public function _forwards()
66  {
67  return array();
68  }
69 
73  public function executeCommand()
74  {
78  global $ilCtrl;
79 
80  $next_class = $ilCtrl->getNextClass();
81 
82  require_once 'Modules/Chatroom/classes/class.ilChatroomTabFactory.php';
83 
84  $tabFactory = new ilChatroomTabFactory($this);
85  $tabFactory->getAdminTabsForCommand($ilCtrl->getCmd());
86 
87  switch($next_class)
88  {
89  case 'ilpermissiongui':
90  include_once 'Services/AccessControl/classes/class.ilPermissionGUI.php';
91  $this->prepareOutput();
92  $perm_gui = new ilPermissionGUI($this);
93  $ilCtrl->forwardCommand($perm_gui);
94  break;
95 
96  default:
97  $res = explode('-', $ilCtrl->getCmd(), 2);
98  $this->dispatchCall($res[0], $res[1] ? $res[1] : '');
99  }
100  }
101 
105  public function getConnector()
106  {
107  require_once 'Modules/Chatroom/classes/class.ilChatroomServerConnector.php';
108  require_once 'Modules/Chatroom/classes/class.ilChatroomServerSettings.php';
109 
111  $connector = new ilChatroomServerConnector($settings);
112 
113  return $connector;
114  }
115 
120  public static function _goto($ref_id)
121  {
122  include_once 'Services/Object/classes/class.ilObjectGUI.php';
124  }
125 
130  public function getRefId()
131  {
132  return $this->object->getRefId();
133  }
134 }