ILIAS  release_8 Revision v8.24
class.ilBiblLibraryTableGUI.php
Go to the documentation of this file.
1<?php
26{
27 use \ILIAS\Modules\OrgUnit\ARHelper\DIC;
28
29
33 public function __construct(ilBiblLibraryGUI $parent_gui)
34 {
35 parent::__construct($parent_gui);
36 $this->setTitle($this->lng()->txt('bibl_settings_libraries'));
37 $this->setId('bibl_libraries_tbl');
38 $this->initColumns();
39 $this->setEnableNumInfo(false);
40 $this->setFormAction($this->ctrl()->getFormAction($parent_gui));
41 $this->setRowTemplate('tpl.bibl_settings_lib_list_row.html', 'Modules/Bibliographic');
42 }
43
44
45 public function fillRow(array $a_set): void
46 {
47 $this->tpl->setVariable('VAL_LIBRARY_NAME', $a_set['name']);
48 $this->tpl->setVariable('VAL_LIBRARY_URL', $a_set['url']);
49 $this->tpl->setVariable('VAL_LIBRARY_IMG', $a_set['img']);
50
51 if ($this->checkPermissionBoolAndReturn('write')) {
52 $this->ctrl()->setParameter($this->parent_obj, ilBiblLibraryGUI::F_LIB_ID, $a_set['id']);
53 $current_selection_list = new ilAdvancedSelectionListGUI();
54 $current_selection_list->setListTitle($this->lng->txt("actions"));
55 $current_selection_list->setId($a_set['id']);
56 $current_selection_list->addItem(
58 "",
59 $this->ctrl()->getLinkTarget($this->parent_obj, ilBiblLibraryGUI::CMD_EDIT)
60 );
61 $current_selection_list->addItem(
63 "",
64 $this->ctrl()->getLinkTarget($this->parent_obj, ilBiblLibraryGUI::CMD_DELETE)
65 );
66 $this->tpl->setVariable('VAL_ACTIONS', $current_selection_list->getHTML());
67 } else {
68 $this->tpl->setVariable('VAL_ACTIONS', "&nbsp;");
69 }
70 }
71
72
73 protected function initColumns(): void
74 {
75 $this->addColumn($this->lng()->txt('bibl_library_name'), '', '30%');
76 $this->addColumn($this->lng()->txt('bibl_library_url'), '30%');
77 $this->addColumn($this->lng()->txt('bibl_library_img'), '', '30%');
78 $this->addColumn($this->lng()->txt('actions'), '', '8%');
79 }
80}
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...
__construct(ilBiblLibraryGUI $parent_gui)
ilObjBibliographicAdminTableGUI constructor.
fillRow(array $a_set)
Standard Version of Fill Row.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
setEnableNumInfo(bool $a_val)
setFormAction(string $a_form_action, bool $a_multipart=false)
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setId(string $a_val)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc