26 use \ILIAS\Modules\OrgUnit\ARHelper\DIC;
32 protected \ilBiblAdminLibraryFacadeInterface
$facade;
35 protected \ILIAS\HTTP\Wrapper\WrapperFactory
$wrapper;
43 $this->main_tpl = $DIC->ui()->mainTemplate();
45 $this->wrapper = $DIC->http()->wrapper();
58 switch ($this->
ctrl()->getNextClass()) {
60 $cmd = $this->
ctrl()->getCmd(self::CMD_INDEX);
73 if ($this->checkPermissionBoolAndReturn(
'write')) {
75 $b->setCaption(self::CMD_ADD);
76 $b->setUrl($this->
ctrl()->getLinkTarget($this, self::CMD_ADD));
83 $this->tpl()->setContent($a_table->getHTML());
92 $settings = $this->facade->libraryFactory()->getAll();
96 "id" => $set->getId(),
97 "name" => $set->getName(),
98 "url" => $set->getUrl(),
99 "img" => $set->getImg(),
102 $table->setData($result);
111 public function add(): void
113 $this->checkPermissionAndFail(
'write');
115 $this->tpl()->setContent($form->getHTML());
122 public function delete():
void 124 $this->checkPermissionAndFail(
'write');
126 $ilBibliographicSetting->delete();
127 $this->
ctrl()->redirect($this, self::CMD_INDEX);
136 $this->
ctrl()->redirect($this, self::CMD_INDEX);
145 $this->checkPermissionAndFail(
'write');
148 $form->setValuesByPost();
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 if ($form->saveObject()) {
166 $this->main_tpl->setOnScreenMessage(
'success', $this->
lng()->txt(
"settings_saved"),
true);
167 $this->
ctrl()->redirect($this, self::CMD_INDEX);
169 $this->tpl()->setContent($form->getHTML());
178 $this->checkPermissionAndFail(
'write');
179 $this->
ctrl()->saveParameter($this, self::F_LIB_ID);
182 $this->tpl()->setContent($form->getHTML());
188 if ($this->wrapper->query()->has(self::F_LIB_ID)) {
189 return $this->facade->libraryFactory()
191 $this->wrapper->query()->retrieve(
198 if ($this->wrapper->post()->has(self::F_LIB_ID)) {
199 return $this->facade->libraryFactory()
201 $this->wrapper->post()->retrieve(
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...
index()
$ilToolbar ilToolbarGUI;
executeCommand()
Execute command.
ILIAS Refinery Factory $refinery
__construct(ilBiblAdminLibraryFacadeInterface $facade)
ilBiblLibraryGUI constructor.
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...
update()
save changes in library
ilGlobalTemplateInterface $main_tpl
ILIAS HTTP Wrapper WrapperFactory $wrapper
ilBiblAdminLibraryFacadeInterface $facade