ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilObjBibliographicAdminGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
17 {
18  const TAB_FIELDS = 'fields';
19  const TAB_SETTINGS = 'settings';
20  const CMD_DEFAULT = 'view';
24  protected $type = 'bibs';
28  public $object;
32  protected $facade;
33 
34 
45  public function __construct($a_data, $a_id, $a_call_by_reference = true, $a_prepare_output = true)
46  {
47  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
48  $this->type = 'bibs';
49  $this->lng->loadLanguageModule('bibl');
50  // Check Permissions globally for all SubGUIs. We check read-permission first
51  $this->checkPermission('read');
52  }
53 
54 
59  public function executeCommand()
60  {
61  $next_class = $this->ctrl->getNextClass($this);
62  switch ($next_class) {
63  case 'ilpermissiongui':
64  $this->prepareOutput();
65  $this->tabs_gui->activateTab('perm_settings');
66  $perm_gui = new ilPermissionGUI($this);
67  $this->ctrl->forwardCommand($perm_gui);
68  break;
69  case strtolower(ilBiblLibraryGUI::class):
70  $this->prepareOutput();
71  $this->tabs_gui->activateTab(self::TAB_SETTINGS);
72  $f = new ilBiblAdminLibraryFacade($this->object);
73  $this->ctrl->forwardCommand(new ilBiblLibraryGUI($f));
74  break;
75  case strtolower(ilBiblAdminRisFieldGUI::class):
76  $this->prepareOutput();
77  $this->tabs_gui->activateTab(self::TAB_FIELDS);
78  $this->ctrl->forwardCommand(new ilBiblAdminRisFieldGUI(new ilBiblAdminFactoryFacade($this->object, ilBiblTypeFactoryInterface::DATA_TYPE_RIS)));
79  break;
80  case strtolower(ilBiblAdminBibtexFieldGUI::class):
81  $this->prepareOutput();
82  $this->tabs_gui->activateTab(self::TAB_FIELDS);
83  $this->ctrl->forwardCommand(new ilBiblAdminBibtexFieldGUI(new ilBiblAdminFactoryFacade($this->object, ilBiblTypeFactoryInterface::DATA_TYPE_BIBTEX)));
84  break;
85  default:
86  $cmd = $this->ctrl->getCmd(self::CMD_DEFAULT);
87  $this->{$cmd}();
88  break;
89  }
90  }
91 
92 
93  protected function view()
94  {
95  $this->ctrl->redirectByClass(ilBiblAdminRisFieldGUI::class);
96  }
97 
98 
99  public function getAdminTabs()
100  {
101  global $DIC;
102  $rbacsystem = $DIC['rbacsystem'];
106  if ($rbacsystem->checkAccess('write', $this->object->getRefId())) {
107  $this->tabs_gui->addTab('fields', $this->lng->txt('fields'), $this->ctrl->getLinkTargetByClass(array(
108  ilObjBibliographicAdminGUI::class,
109  ilBiblAdminRisFieldGUI::class,
111  }
112 
113  if ($rbacsystem->checkAccess('visible,read', $this->object->getRefId())) {
114  $this->tabs_gui->addTab(self::TAB_SETTINGS, $this->lng->txt('settings'), $this->ctrl->getLinkTargetByClass(array(
115  ilObjBibliographicAdminGUI::class,
116  ilBiblLibraryGUI::class,
118  }
119  if ($rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) {
120  $this->tabs_gui->addTarget('perm_settings', $this->ctrl->getLinkTargetByClass('ilpermissiongui', 'perm'), array(), 'ilpermissiongui');
121  }
122  }
123 
124 
128  public function getTabsGui()
129  {
130  return $this->tabs_gui;
131  }
132 
133 
137  public function setTabsGui($tabs_gui)
138  {
139  $this->tabs_gui = $tabs_gui;
140  }
141 }
Class ilBiblLibraryGUI.
Class ilBiblAdminRisFieldGUI.
global $DIC
Definition: saml.php:7
Bibliographic Administration Settings.
prepareOutput($a_show_subobjects=true)
prepare output
Interface ilBiblAdminFactoryFacade.
Class ilObjectGUI Basic methods of all Output classes.
__construct($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
ilObjBibliographicAdminGUI constructor.
Class ilBiblAdminBibtexFieldGUI.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
Interface ilBiblAdminLibraryFacade.
getAdminTabs()
administration tabs show only permissions and trash folder