ILIAS  trunk Revision v11.0_alpha-1838-g59fc79e306b
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.ilObjBibliographicAdminGUI.php
Go to the documentation of this file.
1 <?php
31 {
32  public const TAB_FIELDS = 'fields';
33  public const TAB_SETTINGS = 'settings';
34  public const CMD_DEFAULT = 'view';
35 
36  protected string $type = 'bibs';
37  public ?ilObject $object = null;
38  protected \ilBiblAdminFactoryFacadeInterface $facade;
39 
40 
48  public function __construct($a_data, int $a_id, bool $a_call_by_reference = true, bool $a_prepare_output = true)
49  {
50  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
51  $this->lng->loadLanguageModule('bibl');
52  // Check Permissions globally for all SubGUIs. We check read-permission first
53  $this->checkPermission('read');
54  }
55 
56 
60  #[\Override]
61  public function executeCommand(): void
62  {
63  $next_class = $this->ctrl->getNextClass($this);
64  switch ($next_class) {
65  case 'ilpermissiongui':
66  $this->prepareOutput();
67  $this->tabs_gui->activateTab('perm_settings');
68  $perm_gui = new ilPermissionGUI($this);
69  $this->ctrl->forwardCommand($perm_gui);
70  break;
71  case strtolower(ilBiblLibraryGUI::class):
72  $this->prepareOutput();
73  $this->tabs_gui->activateTab(self::TAB_SETTINGS);
74  $f = new ilBiblAdminLibraryFacade($this->object);
75  $this->ctrl->forwardCommand(new ilBiblLibraryGUI($f));
76  break;
77  case strtolower(ilBiblAdminRisFieldGUI::class):
78  $this->prepareOutput();
79  $this->tabs_gui->activateTab(self::TAB_FIELDS);
81  break;
82  case strtolower(ilBiblAdminBibtexFieldGUI::class):
83  $this->prepareOutput();
84  $this->tabs_gui->activateTab(self::TAB_FIELDS);
86  break;
87  default:
88  $cmd = $this->ctrl->getCmd(self::CMD_DEFAULT);
89  $this->{$cmd}();
90  break;
91  }
92  }
93 
94 
95  protected function view(): void
96  {
97  $this->ctrl->redirectByClass(ilBiblAdminRisFieldGUI::class);
98  }
99 
100 
101  #[\Override]
102  public function getAdminTabs(): void
103  {
104  global $DIC;
105  $rbacsystem = $DIC['rbacsystem'];
109  if ($rbacsystem->checkAccess('write', $this->object->getRefId())) {
110  $this->tabs_gui->addTab('fields', $this->lng->txt('fields'), $this->ctrl->getLinkTargetByClass([
111  ilObjBibliographicAdminGUI::class,
112  ilBiblAdminRisFieldGUI::class,
114  }
115 
116  if ($rbacsystem->checkAccess('visible,read', $this->object->getRefId())) {
117  $this->tabs_gui->addTab(self::TAB_SETTINGS, $this->lng->txt('settings'), $this->ctrl->getLinkTargetByClass([
118  ilObjBibliographicAdminGUI::class,
119  ilBiblLibraryGUI::class,
121  }
122  if ($rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) {
123  $this->tabs_gui->addTarget('perm_settings', $this->ctrl->getLinkTargetByClass('ilpermissiongui', 'perm'), [], 'ilpermissiongui');
124  }
125  }
126 
127 
128  public function getTabsGui(): \ilTabsGUI
129  {
130  return $this->tabs_gui;
131  }
132 
133 
134  public function setTabsGui(\ilTabsGUI $tabs_gui): void
135  {
136  $this->tabs_gui = $tabs_gui;
137  }
138 }
ilBiblAdminFactoryFacadeInterface $facade
Class ilBiblLibraryGUI.
ilTabsGUI $tabs_gui
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
prepareOutput(bool $show_sub_objects=true)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilObjectGUI Basic methods of all Output classes.
__construct($a_data, int $a_id, bool $a_call_by_reference=true, bool $a_prepare_output=true)
ilObjBibliographicAdminGUI constructor.
global $DIC
Definition: shib_login.php:22
__construct(Container $dic, ilPlugin $plugin)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getAdminTabs()
administration tabs show only permissions and trash folder
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)