ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
class.ilObjObjectTemplateAdministrationGUI.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 /* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
5 
14 {
15  public function __construct($a_data, $a_id, bool $a_call_by_reference = true, bool $a_prepare_output = true)
16  {
17  $this->type = "otpl";
18  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
19 
20  $this->lng->loadLanguageModule("didactic");
21  }
22 
23  public function executeCommand(): void
24  {
25  $next_class = $this->ctrl->getNextClass($this);
26  $this->prepareOutput();
27  switch ($next_class) {
28  case 'ilpermissiongui':
29  $this->tabs_gui->setTabActive('perm_settings');
30  $perm_gui = new ilPermissionGUI($this);
31  $this->ctrl->forwardCommand($perm_gui);
32  break;
33 
34  case 'ildidactictemplatesettingsgui':
35  $this->tabs_gui->activateTab('didactic_adm_tab');
36  $did = new ilDidacticTemplateSettingsGUI($this);
37  $this->ctrl->forwardCommand($did);
38  break;
39 
40  default:
41  $this->tabs_gui->activateTab('didactic_adm_tab');
42  $this->ctrl->redirectByClass('ildidactictemplatesettingsgui');
43  break;
44  }
45  }
46 
47  public function getAdminTabs(): void
48  {
49  if ($this->checkPermissionBool('write')) {
50  $this->lng->loadLanguageModule('didactic');
51  $this->tabs_gui->addTarget(
52  'didactic_adm_tab',
53  $this->ctrl->getLinkTargetByClass('ildidactictemplatesettingsgui', 'overview')
54  );
55  }
56 
57  if ($this->rbac_system->checkAccess('edit_permission', $this->object->getRefId())) {
58  $this->tabs_gui->addTarget(
59  "perm_settings",
60  $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm"),
61  [],
62  'ilpermissiongui'
63  );
64  }
65  }
66 }
prepareOutput(bool $show_sub_objects=true)
__construct(VocabulariesInterface $vocabularies)
Class ilObjectGUI Basic methods of all Output classes.
__construct($a_data, $a_id, bool $a_call_by_reference=true, bool $a_prepare_output=true)
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
Settings for a single didactic template.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.