47 $this->main_tpl = $DIC->ui()->mainTemplate();
48 $this->wrapper = $DIC->http()->wrapper();
61 if ($this->
ctrl()->getNextClass() ===
null) {
62 $cmd = $this->
ctrl()->getCmd(self::CMD_INDEX);
74 if ($this->checkPermissionBoolAndReturn(
'write')) {
75 $btn_add = $this->
ui()->factory()->button()->primary(
76 $this->
lng()->txt(self::CMD_ADD),
77 $this->
ctrl()->getLinkTarget($this, self::CMD_ADD)
79 $this->
toolbar()->addComponent($btn_add);
84 $this->tpl()->setContent($table_gui->getRenderedTable());
93 public function add(): void
95 $this->checkPermissionAndFail(
'write');
97 $this->tpl()->setContent($form->getHTML());
104 public function delete():
void 106 $this->checkPermissionAndFail(
'write');
108 foreach ($ilBibliographicSettings as $ilBibliographicSetting) {
109 $ilBibliographicSetting->delete();
111 $this->
ctrl()->redirect($this, self::CMD_INDEX);
120 $this->
ctrl()->redirect($this, self::CMD_INDEX);
129 $this->checkPermissionAndFail(
'write');
132 $form->setValuesByPost();
133 if ($form->saveObject()) {
134 $this->main_tpl->setOnScreenMessage(
'success', $this->
lng()->txt(
"settings_saved"),
true);
135 $this->
ctrl()->redirect($this, self::CMD_INDEX);
137 $this->tpl()->setContent($form->getHTML());
146 $this->checkPermissionAndFail(
'write');
149 if ($form->saveObject()) {
150 $this->main_tpl->setOnScreenMessage(
'success', $this->
lng()->txt(
"settings_saved"),
true);
151 $this->
ctrl()->redirect($this, self::CMD_INDEX);
153 $this->tpl()->setContent($form->getHTML());
162 $this->checkPermissionAndFail(
'write');
165 $this->tpl()->setContent($form->getHTML());
174 $to_int = $this->
refinery->kindlyTo()->int();
175 $to_int_array = $this->
refinery->kindlyTo()->listOf($to_int);
176 if ($this->wrapper->query()->has(self::F_LIB_IDS)) {
177 $lib_ids = $this->wrapper->query()->retrieve(self::F_LIB_IDS, $to_int_array);
178 } elseif ($this->wrapper->query()->has(self::F_LIB_ID)) {
179 $lib_ids[] = $this->wrapper->query()->retrieve(self::F_LIB_ID, $to_int);
180 } elseif ($this->wrapper->post()->has(self::F_LIB_IDS)) {
181 $lib_ids = $this->wrapper->post()->retrieve(self::F_LIB_IDS, $to_int_array);
182 } elseif ($this->wrapper->post()->has(self::F_LIB_ID)) {
183 $lib_ids[] = $this->wrapper->post()->retrieve(self::F_LIB_ID, $to_int);
186 if ($lib_ids ===
null) {
191 foreach ($lib_ids as $lib_id) {
192 $instances[] = $this->facade->libraryFactory()->findById($lib_id);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
index()
$ilToolbar ilToolbarGUI;
executeCommand()
Execute command.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
__construct(protected \ilBiblAdminLibraryFacadeInterface $facade)
ilBiblLibraryGUI constructor.
update()
save changes in library
ilGlobalTemplateInterface $main_tpl
getInstancesFromRequest()
return ilBiblLibraryInterface[]