ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilObjChatroomAdminGUI.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
5 require_once "./classes/class.ilObjectGUI.php";
6 require_once "./Modules/Chatroom/classes/class.ilObjChatroom.php";
7 require_once "./Modules/Chatroom/classes/class.ilObjChatroomAccess.php";
8 require_once 'Modules/Chatroom/lib/DatabayHelper/databayHelperLoader.php';
9 
25 {
26 
34  public function __construct($a_data = null, $a_id = null, $a_call_by_reference = true)
35  {
36  global $lng;
37 
38  $lng->loadLanguageModule( 'chatroom_adm' );
39 
40  if( $a_data == null )
41  {
42  if( $_GET['serverInquiry'] )
43  {
44  require_once dirname( __FILE__ ) . '/class.ilChatroomServerHandler.php';
46  return;
47  }
48  }
49 
50  $this->type = 'chta';
51  $this->ilObjectGUI( $a_data, $a_id, $a_call_by_reference, false );
52 
53  }
54 
61  protected function getObjectDefinition()
62  {
64  'Chatroom', 'admintasks'
65  );
66  }
67 
73  public function _forwards()
74  {
75  return array();
76  }
77 
83  public function executeCommand()
84  {
85  //global $ilAccess, $ilNavigationHistory, $ilCtrl, $ilUser, $ilTabs;
86  global $ilCtrl;
87 
88  $next_class = $ilCtrl->getNextClass();
89 
90  require_once 'Modules/Chatroom/classes/class.ilChatroomTabFactory.php';
91 
92  $tabFactory = new ilChatroomTabFactory( $this );
93  $tabFactory->getAdminTabsForCommand( $ilCtrl->getCmd() );
94 
95  switch($next_class)
96  {
97  case 'ilpermissiongui':
98  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
99  $this->prepareOutput();
100  $perm_gui = & new ilPermissionGUI( $this );
101  $ret = & $this->ctrl->forwardCommand( $perm_gui );
102  break;
103 
104  default:
105  $res = split( '-', $ilCtrl->getCmd(), 2 );
106  $this->dispatchCall( $res[0], $res[1] ? $res[1] : '' );
107  }
108  }
109 
115  public function getConnector()
116  {
117  require_once 'Modules/Chatroom/classes/class.ilChatroomServerConnector.php';
118  require_once 'Modules/Chatroom/classes/class.ilChatroomServerSettings.php';
119 
121  $connector = new ilChatroomServerConnector( $settings );
122 
123  return $connector;
124  }
125 
132  public static function _goto($ref_id)
133  {
134  //global $ilCtrl;
135  //$ilCtrl->setParameter($this, 'cmd', 'view');
136 
137  $_GET['cmd'] = 'view';
138  $_GET['ref_id'] = $ref_id;
139  require 'repository.php';
140  }
141 
147  public function getRefId()
148  {
149  return $this->object->getRefId();
150  }
151 
152 }
153 
154 ?>