ILIAS  release_8 Revision v8.24
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->type = 'bibs';
52 $this->lng->loadLanguageModule('bibl');
53 // Check Permissions globally for all SubGUIs. We check read-permission first
54 $this->checkPermission('read');
55 }
56
57
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 public function getAdminTabs(): void
102 {
103 global $DIC;
104 $rbacsystem = $DIC['rbacsystem'];
108 if ($rbacsystem->checkAccess('write', $this->object->getRefId())) {
109 $this->tabs_gui->addTab('fields', $this->lng->txt('fields'), $this->ctrl->getLinkTargetByClass(array(
110 ilObjBibliographicAdminGUI::class,
111 ilBiblAdminRisFieldGUI::class,
113 }
114
115 if ($rbacsystem->checkAccess('visible,read', $this->object->getRefId())) {
116 $this->tabs_gui->addTab(self::TAB_SETTINGS, $this->lng->txt('settings'), $this->ctrl->getLinkTargetByClass(array(
117 ilObjBibliographicAdminGUI::class,
118 ilBiblLibraryGUI::class,
120 }
121 if ($rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) {
122 $this->tabs_gui->addTarget('perm_settings', $this->ctrl->getLinkTargetByClass('ilpermissiongui', 'perm'), array(), 'ilpermissiongui');
123 }
124 }
125
126
127 public function getTabsGui(): \ilTabsGUI
128 {
129 return $this->tabs_gui;
130 }
131
132
133 public function setTabsGui(\ilTabsGUI $tabs_gui): void
134 {
135 $this->tabs_gui = $tabs_gui;
136 }
137}
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...
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...
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...
ilBiblAdminFactoryFacadeInterface $facade
__construct($a_data, int $a_id, bool $a_call_by_reference=true, bool $a_prepare_output=true)
ilObjBibliographicAdminGUI constructor.
Class ilObjectGUI Basic methods of all Output classes.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
getAdminTabs()
administration tabs show only permissions and trash folder
ilTabsGUI $tabs_gui
prepareOutput(bool $show_sub_objects=true)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc