ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilObjObjectTemplateAdministrationGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 include_once("./Services/Object/classes/class.ilObjectGUI.php");
5 
18 {
24  public function __construct($a_data, $a_id, $a_call_by_reference = true, $a_prepare_output = true)
25  {
26  $this->type = "otpl";
27  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
28 
29  $this->lng->loadLanguageModule("didactic");
30  }
31 
38  public function executeCommand()
39  {
40  global $DIC;
41 
42  $rbacsystem = $DIC['rbacsystem'];
43  $ilErr = $DIC['ilErr'];
44  $ilAccess = $DIC['ilAccess'];
45  $ilTabs = $DIC['ilTabs'];
46 
47  $next_class = $this->ctrl->getNextClass($this);
48  $cmd = $this->ctrl->getCmd();
49 
50  $this->prepareOutput();
51 
52  switch ($next_class) {
53 
54  case 'ilpermissiongui':
55  $this->tabs_gui->setTabActive('perm_settings');
56  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
57  $perm_gui = new ilPermissionGUI($this);
58  $ret = &$this->ctrl->forwardCommand($perm_gui);
59  break;
60 
61  case 'ildidactictemplatesettingsgui':
62 
63  $ilTabs->activateTab('didactic_adm_tab');
64  include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateSettingsGUI.php';
65  $did = new ilDidacticTemplateSettingsGUI($this);
66  $this->ctrl->forwardCommand($did);
67  break;
68 
69  default:
70 
71  $ilTabs->activateTab('didactic_adm_tab');
72  $this->ctrl->redirectByClass('ildidactictemplatesettingsgui');
73  break;
74  }
75  }
76 
83  public function getAdminTabs()
84  {
85  global $DIC;
86 
87  $rbacsystem = $DIC['rbacsystem'];
88  $ilAccess = $DIC['ilAccess'];
89  $lng = $DIC['lng'];
90  $ilTabs = $DIC['ilTabs'];
91 
92  if ($this->checkPermissionBool('write')) {
93  $lng->loadLanguageModule('didactic');
94  $ilTabs->addTarget(
95  'didactic_adm_tab',
96  $this->ctrl->getLinkTargetByClass('ildidactictemplatesettingsgui', 'overview')
97  );
98  }
99 
100  if ($rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) {
101  $this->tabs_gui->addTarget(
102  "perm_settings",
103  $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm"),
104  array(),
105  'ilpermissiongui'
106  );
107  }
108  }
109 }
global $DIC
Definition: saml.php:7
prepareOutput($a_show_subobjects=true)
prepare output
Class ilObjectGUI Basic methods of all Output classes.
$ret
Definition: parser.php:6
__construct($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
Contructor.
Settings for a single didactic template.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.