ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilObjTaxonomyAdministrationGUI.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 
17 {
21  protected $rbacsystem;
22 
28  public function __construct($a_data, $a_id, $a_call_by_reference = true, $a_prepare_output = true)
29  {
30  global $DIC;
31 
32  $this->rbacsystem = $DIC->rbac()->system();
33  $this->type = "taxs";
34  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
35 
36  $this->lng->loadLanguageModule("tax");
37  }
38 
42  public function executeCommand()
43  {
44  $next_class = $this->ctrl->getNextClass($this);
45  $cmd = $this->ctrl->getCmd();
46 
47  $this->prepareOutput();
48 
49  switch ($next_class) {
50  case 'ilpermissiongui':
51  $this->tabs_gui->activateTab('perm_settings');
52  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
53  $perm_gui = new ilPermissionGUI($this);
54  $this->ctrl->forwardCommand($perm_gui);
55  break;
56 
57  default:
58  if (!$cmd || $cmd == 'view') {
59  $cmd = "listRepository";
60  }
61 
62  $this->$cmd();
63  break;
64  }
65  return true;
66  }
67 
71  public function getAdminTabs()
72  {
74 
75  if ($rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
76  $this->tabs_gui->addTab(
77  "settings",
78  $this->lng->txt("tax_admin_settings_repository"),
79  $this->ctrl->getLinkTarget($this, "listRepository")
80  );
81  }
82 
83  if ($rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) {
84  $this->tabs_gui->addTab(
85  "perm_settings",
86  $this->lng->txt("perm_settings"),
87  $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm")
88  );
89  }
90  }
91 
95  public function listRepository()
96  {
97  $this->tabs_gui->activateTab('settings');
98 
99  require_once "Services/Taxonomy/classes/class.ilTaxonomyAdministrationRepositoryTableGUI.php";
100  $tbl = new ilTaxonomyAdministrationRepositoryTableGUI($this, "listRepository", $this->object);
101  $this->tpl->setContent($tbl->getHTML());
102  }
103 }
global $DIC
Definition: saml.php:7
$tbl
Definition: example_048.php:81
listRepository()
List taxonomies of repository objects.
prepareOutput($a_show_subobjects=true)
prepare output
Class ilObjectGUI Basic methods of all Output classes.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
__construct($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
Contructor.