ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 $DIC;
25 
26  $lng = $DIC['lng'];
27 
28  $this->type = 'cals';
29  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
30 
31  $this->lng = $lng;
32  $this->lng->loadLanguageModule('dateplaner');
33  $this->lng->loadLanguageModule('jscalendar');
34  }
35 
42  public function executeCommand()
43  {
44  global $DIC;
45 
46  $ilErr = $DIC['ilErr'];
47  $ilAccess = $DIC['ilAccess'];
48 
49  $next_class = $this->ctrl->getNextClass($this);
50  $cmd = $this->ctrl->getCmd();
51 
52  $this->prepareOutput();
53 
54  if (!$ilAccess->checkAccess('read', '', $this->object->getRefId())) {
55  $ilErr->raiseError($this->lng->txt('no_permission'), $ilErr->WARNING);
56  }
57 
58  switch ($next_class) {
59  case 'ilpermissiongui':
60  $this->tabs_gui->setTabActive('perm_settings');
61  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
62  $perm_gui = new ilPermissionGUI($this);
63  $ret = &$this->ctrl->forwardCommand($perm_gui);
64  break;
65 
66  case 'ilecssettingsgui':
67  $this->tabs_gui->setTabActive('settings');
68  include_once './Services/WebServices/ECS/classes/class.ilECSSettingsGUI.php';
70  $this->ctrl->forwardCommand($settings);
71  break;
72 
73  default:
74  $this->tabs_gui->setTabActive('settings');
75  include_once './Services/WebServices/ECS/classes/class.ilECSSettingsGUI.php';
77  $this->ctrl->setCmdClass('ilecssettingsgui');
78  $this->ctrl->forwardCommand($settings);
79  break;
80  }
81  return true;
82  }
83 
84 
91  public function getAdminTabs()
92  {
93  global $DIC;
94 
95  $rbacsystem = $DIC['rbacsystem'];
96  $ilAccess = $DIC['ilAccess'];
97  if ($ilAccess->checkAccess("read", '', $this->object->getRefId())) {
98  $this->tabs_gui->addTarget(
99  "settings",
100  $this->ctrl->getLinkTargetByClass('ilecssettingsgui', "overview"),
101  array(),
102  'ilecssettingsgui'
103  );
104  }
105  if ($ilAccess->checkAccess('edit_permission', '', $this->object->getRefId())) {
106  $this->tabs_gui->addTarget(
107  "perm_settings",
108  $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm"),
109  array(),
110  'ilpermissiongui'
111  );
112  }
113  }
114 }
global $DIC
Definition: saml.php:7
__construct($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
Constructor.
prepareOutput($a_show_subobjects=true)
prepare output
Class ilObjectGUI Basic methods of all Output classes.
executeCommand()
Execute command.
$ret
Definition: parser.php:6
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.