ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilStudyProgrammeAutoCategoriesTableGUI.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
11{
12 public function __construct(
13 $a_parent_obj,
14 $a_parent_cmd = "",
15 $a_template_context = ""
16 ) {
17 $this->setId("sp_ac_list");
18 parent::__construct($a_parent_obj, $a_parent_cmd, $a_template_context);
19
20 $this->setTitle($this->lng->txt('content_automation_title'));
21 $this->setEnableTitle(true);
22 $this->setTopCommands(false);
23 $this->setEnableHeader(true);
24 $this->setExternalSorting(false);
25 $this->setExternalSegmentation(true);
26 $this->setRowTemplate("tpl.autocats_table_row.html", "Modules/StudyProgramme");
27 $this->setShowRowsSelector(false);
28 $this->setFormAction($this->ctrl->getFormAction($a_parent_obj, "view"));
29 $this->disable('sort');
30
31 $this->addColumn("", "", "1", true);
32 $this->addColumn($this->lng->txt('title'), 'title');
33 $this->addColumn($this->lng->txt('last_edited_by'), 'editor');
34 $this->addColumn($this->lng->txt('last_edited'), 'last');
35 $this->addColumn($this->lng->txt(''), 'actions');
36
38 $this->setEnableAllCommand(true);
39 $this->addMultiCommand('deleteConfirmation', $this->lng->txt('delete'));
40 }
41
42 protected function fillRow($set)
43 {
44 list($ac, $title, $usr, $actions) = $set;
45 $username = ilObjUser::_lookupName($ac->getLastEditorId());
46 $editor = implode(' ', [
47 $username['firstname'],
48 $username['lastname'],
49 '(' . $username['login'] . ')'
50 ]);
51
52 $this->tpl->setVariable("ID", $ac->getCategoryRefId());
53 $this->tpl->setVariable("TITLE", $title);
54 $this->tpl->setVariable("EDITOR", $usr);
55 $this->tpl->setVariable("LAST_EDITED", $ac->getLastEdited()->format('Y/m/d H:i:s'));
56 $this->tpl->setVariable("ACTIONS", $actions);
57 }
58}
An exception for terminatinating execution or to throw for unit testing.
static _lookupName($a_user_id)
lookup user name
__construct( $a_parent_obj, $a_parent_cmd="", $a_template_context="")
ilTable2GUI constructor.
Class ilTable2GUI.
setTopCommands($a_val)
Set top commands (display command buttons on top of table, too)
setEnableHeader($a_enableheader)
Set Enable Header.
setExternalSorting($a_val)
Set external sorting.
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setSelectAllCheckbox($a_select_all_checkbox, $a_select_all_on_top=false)
Set the name of the checkbox that should be toggled with a select all button.
setEnableAllCommand($a_value)
Enable actions for all entries in current result.
setEnableTitle($a_enabletitle)
Set Enable Title.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
addMultiCommand($a_cmd, $a_text)
Add Command button.
addColumn( $a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
setExternalSegmentation($a_val)
Set external segmentation.
setId($a_val)
Set id.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
disable($a_module_name)
diesables particular modules of table
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc