ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilChatroomObjectGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 require_once 'Modules/Chatroom/classes/class.ilChatroomObjectDefinition.php';
5 require_once 'Modules/Chatroom/classes/class.ilChatroomTaskHandler.php';
6 
11 abstract class ilChatroomObjectGUI extends ilObjectGUI
12 {
17  abstract protected function getObjectDefinition();
18 
23  abstract public function getConnector();
24 
30  protected function dispatchCall($task, $method)
31  {
35  $definition = $this->getObjectDefinition();
36  if($definition->hasTask($task))
37  {
38  $definition->loadTask($task);
39  $taskHandler = $definition->buildTask($task, $this);
40  $taskHandler->execute($method);
41  }
42  }
43 
47  public function switchToVisibleMode()
48  {
49  $this->prepareOutput();
50  }
51 
55  public function getAdminTabs(ilTabsGUI $tabs_gui)
56  {
60  global $tree;
61 
62  if(isset($_GET['admin_mode']) && $_GET['admin_mode'] == 'repository')
63  {
64  $this->ctrl->setParameterByClass('iladministrationgui', 'admin_mode', 'settings');
65  $tabs_gui->setBackTarget(
66  $this->lng->txt('administration'),
67  $this->ctrl->getLinkTargetByClass('iladministrationgui', 'frameset'),
68  ilFrameTargetInfo::_getFrame('MainContent')
69  );
70  $this->ctrl->setParameterByClass('iladministrationgui', 'admin_mode', 'repository');
71  }
72  if($tree->getSavedNodeData($this->object->getRefId()))
73  {
74  $tabs_gui->addTarget('trash', $this->ctrl->getLinkTarget($this, 'trash'), 'trash', get_class($this));
75  }
76  }
77 }