ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
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::ilObjectGUI($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 
50  case 'ilpermissiongui':
51  $this->tabs_gui->setTabActive('perm_settings');
52  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
53  $perm_gui =& new ilPermissionGUI($this);
54  $ret =& $this->ctrl->forwardCommand($perm_gui);
55  break;
56 
57  case 'ildidactictemplatesettingsgui':
58 
59  $ilTabs->activateTab('didactic_adm_tab');
60  include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateSettingsGUI.php';
61  $did = new ilDidacticTemplateSettingsGUI($this);
62  $this->ctrl->forwardCommand($did);
63  break;
64 
65  default:
66 
67  $ilTabs->activateTab('didactic_adm_tab');
68  $this->ctrl->redirectByClass('ildidactictemplatesettingsgui');
69  break;
70  }
71  }
72 
79  public function getAdminTabs()
80  {
81  global $rbacsystem, $ilAccess,$lng,$ilTabs;
82 
83  if($this->checkPermissionBool('write'))
84  {
85  $lng->loadLanguageModule('didactic');
86  $ilTabs->addTarget(
87  'didactic_adm_tab',
88  $this->ctrl->getLinkTargetByClass('ildidactictemplatesettingsgui','overview')
89  );
90  }
91 
92  if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
93  {
94  $this->tabs_gui->addTarget("perm_settings",
95  $this->ctrl->getLinkTargetByClass('ilpermissiongui',"perm"),
96  array(),'ilpermissiongui');
97  }
98  }
99 
100 
101 }
102 ?>