ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilObjECSSettingsGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2011 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 include_once './Services/Object/classes/class.ilObjectGUI.php';
5 
15 {
16 
22  public function __construct($a_data, $a_id, $a_call_by_reference = true, $a_prepare_output = true)
23  {
24  global $lng;
25 
26  $this->type = 'cals';
27  parent::ilObjectGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
28 
29  $this->lng = $lng;
30  $this->lng->loadLanguageModule('dateplaner');
31  $this->lng->loadLanguageModule('jscalendar');
32  }
33 
40  public function executeCommand()
41  {
42  global $ilErr,$ilAccess;
43 
44  $next_class = $this->ctrl->getNextClass($this);
45  $cmd = $this->ctrl->getCmd();
46 
47  $this->prepareOutput();
48 
49  if(!$ilAccess->checkAccess('read','',$this->object->getRefId()))
50  {
51  $ilErr->raiseError($this->lng->txt('no_permission'),$ilErr->WARNING);
52  }
53 
54  switch($next_class)
55  {
56  case 'ilpermissiongui':
57  $this->tabs_gui->setTabActive('perm_settings');
58  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
59  $perm_gui =& new ilPermissionGUI($this);
60  $ret =& $this->ctrl->forwardCommand($perm_gui);
61  break;
62 
63  case 'ilecssettingsgui':
64  $this->tabs_gui->setTabActive('settings');
65  include_once './Services/WebServices/ECS/classes/class.ilECSSettingsGUI.php';
66  $settings = new ilECSSettingsGUI();
67  $this->ctrl->forwardCommand($settings);
68  break;
69 
70  default:
71  $this->tabs_gui->setTabActive('settings');
72  include_once './Services/WebServices/ECS/classes/class.ilECSSettingsGUI.php';
73  $settings = new ilECSSettingsGUI();
74  $this->ctrl->setCmdClass('ilecssettingsgui');
75  $this->ctrl->forwardCommand($settings);
76  break;
77  }
78  return true;
79  }
80 
81 
88  public function getAdminTabs()
89  {
90  global $rbacsystem, $ilAccess;
91  if ($ilAccess->checkAccess("read",'',$this->object->getRefId()))
92  {
93  $this->tabs_gui->addTarget("settings",
94  $this->ctrl->getLinkTargetByClass('ilecssettingsgui', "overview"),
95  array(),
96  'ilecssettingsgui'
97  );
98  }
99  if ($ilAccess->checkAccess('edit_permission','',$this->object->getRefId()))
100  {
101  $this->tabs_gui->addTarget("perm_settings",
102  $this->ctrl->getLinkTargetByClass('ilpermissiongui',"perm"),
103  array(),'ilpermissiongui');
104  }
105  }
106 
107 }
108 ?>