ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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
4include_once './Services/Object/classes/class.ilObjectGUI.php';
5
15{
16
20 protected $dic;
24 protected $error;
28 protected $rbacsystem;
29
35 public function __construct($a_data, $a_id, $a_call_by_reference = true, $a_prepare_output = true)
36 {
37 global $DIC;
38 $this->type = 'cals';
39 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
40
41 $this->dic = $DIC;
42 $this->error = $DIC['ilErr'];
43 $this->rbacsystem = $DIC->rbac()->system();
44 $this->lng = $this->dic->language();
45 $this->lng->loadLanguageModule('dateplaner');
46 $this->lng->loadLanguageModule('jscalendar');
47 }
48
55 public function executeCommand()
56 {
57 $next_class = $this->ctrl->getNextClass($this);
58
59 $this->prepareOutput();
60
61 if (!$this->rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
62 $this->error->raiseError($this->lng->txt('no_permission'), $this->error->WARNING);
63 }
64
65 switch ($next_class) {
66 case 'ilpermissiongui':
67 $this->tabs_gui->setTabActive('perm_settings');
68 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
69 $perm_gui = new ilPermissionGUI($this);
70 $ret = &$this->ctrl->forwardCommand($perm_gui);
71 break;
72
73 case 'ilecssettingsgui':
74 $this->tabs_gui->setTabActive('settings');
75 include_once './Services/WebServices/ECS/classes/class.ilECSSettingsGUI.php';
77 $this->ctrl->forwardCommand($settings);
78 break;
79
80 default:
81 $this->tabs_gui->setTabActive('settings');
82 include_once './Services/WebServices/ECS/classes/class.ilECSSettingsGUI.php';
84 $this->ctrl->setCmdClass('ilecssettingsgui');
85 $this->ctrl->forwardCommand($settings);
86 break;
87 }
88 return true;
89 }
90
91
98 public function getAdminTabs()
99 {
100 global $DIC;
101
102 $rbacsystem = $DIC['rbacsystem'];
103 $ilAccess = $DIC['ilAccess'];
104 if ($ilAccess->checkAccess("read", '', $this->object->getRefId())) {
105 $this->tabs_gui->addTarget(
106 "settings",
107 $this->ctrl->getLinkTargetByClass('ilecssettingsgui', "overview"),
108 array(),
109 'ilecssettingsgui'
110 );
111 }
112 if ($ilAccess->checkAccess('edit_permission', '', $this->object->getRefId())) {
113 $this->tabs_gui->addTarget(
114 "perm_settings",
115 $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm"),
116 array(),
117 'ilpermissiongui'
118 );
119 }
120 }
121}
An exception for terminatinating execution or to throw for unit testing.
error($a_errmsg)
set error message @access public
executeCommand()
Execute command.
__construct($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
Constructor.
Class ilObjectGUI Basic methods of all Output classes.
prepareOutput($a_show_subobjects=true)
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$ret
Definition: parser.php:6
$DIC
Definition: xapitoken.php:46