ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 $rbacsystem,$ilErr,$ilAccess, $ilTabs;
41 
42  $next_class = $this->ctrl->getNextClass($this);
43  $cmd = $this->ctrl->getCmd();
44 
45  $this->prepareOutput();
46 
47  switch ($next_class) {
48 
49  case 'ilpermissiongui':
50  $this->tabs_gui->setTabActive('perm_settings');
51  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
52  $perm_gui = new ilPermissionGUI($this);
53  $ret =&$this->ctrl->forwardCommand($perm_gui);
54  break;
55 
56  case 'ildidactictemplatesettingsgui':
57 
58  $ilTabs->activateTab('didactic_adm_tab');
59  include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateSettingsGUI.php';
60  $did = new ilDidacticTemplateSettingsGUI($this);
61  $this->ctrl->forwardCommand($did);
62  break;
63 
64  default:
65 
66  $ilTabs->activateTab('didactic_adm_tab');
67  $this->ctrl->redirectByClass('ildidactictemplatesettingsgui');
68  break;
69  }
70  }
71 
78  public function getAdminTabs()
79  {
80  global $rbacsystem, $ilAccess,$lng,$ilTabs;
81 
82  if ($this->checkPermissionBool('write')) {
83  $lng->loadLanguageModule('didactic');
84  $ilTabs->addTarget(
85  'didactic_adm_tab',
86  $this->ctrl->getLinkTargetByClass('ildidactictemplatesettingsgui', 'overview')
87  );
88  }
89 
90  if ($rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) {
91  $this->tabs_gui->addTarget(
92  "perm_settings",
93  $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm"),
94  array(),
95  'ilpermissiongui'
96  );
97  }
98  }
99 }
prepareOutput($a_show_subobjects=true)
prepare output
Class ilObjectGUI Basic methods of all Output classes.
Create styles array
The data for the language used.
$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.