ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
class.ilObjObjectTemplateAdministrationGUI.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
28 {
29  public function __construct($a_data, $a_id, bool $a_call_by_reference = true, bool $a_prepare_output = true)
30  {
31  $this->type = "otpl";
32  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
33 
34  $this->lng->loadLanguageModule("didactic");
35  }
36 
37  public function executeCommand(): void
38  {
39  $next_class = $this->ctrl->getNextClass($this);
40  $this->prepareOutput();
41  switch ($next_class) {
42  case 'ilpermissiongui':
43  $this->tabs_gui->setTabActive('perm_settings');
44  $perm_gui = new ilPermissionGUI($this);
45  $this->ctrl->forwardCommand($perm_gui);
46  break;
47 
48  case 'ildidactictemplatesettingsgui':
49  $this->tabs_gui->activateTab('didactic_adm_tab');
50  $did = new ilDidacticTemplateSettingsGUI($this);
51  $this->ctrl->forwardCommand($did);
52  break;
53 
54  default:
55  $this->tabs_gui->activateTab('didactic_adm_tab');
56  $this->ctrl->redirectByClass('ildidactictemplatesettingsgui');
57  break;
58  }
59  }
60 
61  public function getAdminTabs(): void
62  {
63  if ($this->checkPermissionBool('write')) {
64  $this->lng->loadLanguageModule('didactic');
65  $this->tabs_gui->addTarget(
66  'didactic_adm_tab',
67  $this->ctrl->getLinkTargetByClass('ildidactictemplatesettingsgui', 'overview')
68  );
69  }
70 
71  if ($this->rbac_system->checkAccess('edit_permission', $this->object->getRefId())) {
72  $this->tabs_gui->addTarget(
73  "perm_settings",
74  $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm"),
75  [],
76  'ilpermissiongui'
77  );
78  }
79  }
80 }
prepareOutput(bool $show_sub_objects=true)
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)
__construct(Container $dic, ilPlugin $plugin)
Settings for a single didactic template.