ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
class.ilObjECSSettingsGUI.php
Go to the documentation of this file.
1 <?php
2 
18 declare(strict_types=1);
19 
27 {
28  public function __construct($a_data, int $a_id, bool $a_call_by_reference = true, bool $a_prepare_output = true)
29  {
30  $this->type = 'cals';
31  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
32 
33  $this->lng->loadLanguageModule('dateplaner');
34  $this->lng->loadLanguageModule('jscalendar');
35  }
36 
43  public function executeCommand(): void
44  {
45  $next_class = $this->ctrl->getNextClass($this);
46 
47  $this->prepareOutput();
48 
49  if (!$this->rbac_system->checkAccess("visible,read", $this->object->getRefId())) {
50  $this->error->raiseError($this->lng->txt('no_permission'), $this->error->WARNING);
51  }
52 
53  switch ($next_class) {
54  case 'ilpermissiongui':
55  $this->tabs_gui->setTabActive('perm_settings');
56  $perm_gui = new ilPermissionGUI($this);
57  $this->ctrl->forwardCommand($perm_gui);
58  break;
59 
60  default:
61  $this->tabs_gui->setTabActive('settings');
63  $this->ctrl->forwardCommand($settings);
64  break;
65  }
66  }
67 
68 
75  public function getAdminTabs(): void
76  {
77  if ($this->access->checkAccess("read", '', $this->object->getRefId())) {
78  $this->tabs_gui->addTarget(
79  "settings",
80  $this->ctrl->getLinkTargetByClass('ilecssettingsgui', "overview"),
81  array(),
82  'ilecssettingsgui'
83  );
84  }
85  if ($this->access->checkAccess('edit_permission', '', $this->object->getRefId())) {
86  $this->tabs_gui->addTarget(
87  "perm_settings",
88  $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm"),
89  array(),
90  'ilpermissiongui'
91  );
92  }
93  }
94 }
prepareOutput(bool $show_sub_objects=true)
Class ilObjectGUI Basic methods of all Output classes.
__construct($a_data, int $a_id, bool $a_call_by_reference=true, bool $a_prepare_output=true)
executeCommand()
Execute command.
__construct(Container $dic, ilPlugin $plugin)
ilSetting $settings