ILIAS  release_8 Revision v8.25-1-g13de6a5eca6
class.ilObjObjectTemplateAdministrationGUI.php
Go to the documentation of this file.
1<?php
2
3declare(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
29 case 'ilpermissiongui':
30 $this->tabs_gui->setTabActive('perm_settings');
31 $perm_gui = new ilPermissionGUI($this);
32 $this->ctrl->forwardCommand($perm_gui);
33 break;
34
35 case 'ildidactictemplatesettingsgui':
36 $this->tabs_gui->activateTab('didactic_adm_tab');
37 $did = new ilDidacticTemplateSettingsGUI($this);
38 $this->ctrl->forwardCommand($did);
39 break;
40
41 default:
42 $this->tabs_gui->activateTab('didactic_adm_tab');
43 $this->ctrl->redirectByClass('ildidactictemplatesettingsgui');
44 break;
45 }
46 }
47
48 public function getAdminTabs(): void
49 {
50 if ($this->checkPermissionBool('write')) {
51 $this->lng->loadLanguageModule('didactic');
52 $this->tabs_gui->addTarget(
53 'didactic_adm_tab',
54 $this->ctrl->getLinkTargetByClass('ildidactictemplatesettingsgui', 'overview')
55 );
56 }
57
58 if ($this->rbac_system->checkAccess('edit_permission', $this->object->getRefId())) {
59 $this->tabs_gui->addTarget(
60 "perm_settings",
61 $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm"),
62 [],
63 'ilpermissiongui'
64 );
65 }
66 }
67}
Settings for a single didactic template.
getAdminTabs()
administration tabs show only permissions and trash folder
__construct($a_data, $a_id, bool $a_call_by_reference=true, bool $a_prepare_output=true)
Class ilObjectGUI Basic methods of all Output classes.
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
prepareOutput(bool $show_sub_objects=true)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc