ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilStudyProgrammeAutoMembershipsTableGUI.php
Go to the documentation of this file.
1<?php
2
3 declare(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 $this->setTitle($this->lng->txt('auto_membership_title'));
20 $this->setEnableTitle(true);
21 $this->setTopCommands(false);
22 $this->setEnableHeader(true);
23 $this->setExternalSorting(false);
24 $this->setExternalSegmentation(true);
25 $this->setRowTemplate("tpl.automembers_table_row.html", "Modules/StudyProgramme");
26 $this->setShowRowsSelector(false);
27 $this->setFormAction($this->ctrl->getFormAction($a_parent_obj, "view"));
28 $this->disable('sort');
29 $this->addColumn("", "", "1", true);
30 $this->addColumn($this->lng->txt('auto_membership_src_type'), 'type');
31 $this->addColumn($this->lng->txt('title'), 'title');
32 $this->addColumn($this->lng->txt('last_edited_by'), 'editor');
33 $this->addColumn($this->lng->txt('last_edited'), 'last');
34 $this->addColumn($this->lng->txt('status'), 'status');
35 $this->addColumn($this->lng->txt(''), 'actions');
37 $this->setEnableAllCommand(true);
38 $this->addMultiCommand('deleteConfirmation', $this->lng->txt('delete'));
39 }
40
41 protected function fillRow($set)
42 {
43 list($ams, $title, $usr, $actions) = $set;
44
45 $username = ilObjUser::_lookupName($ams->getLastEditorId());
46 $editor = implode(' ', [
47 $username['firstname'],
48 $username['lastname'],
49 '(' . $username['login'] . ')'
50 ]);
51
52 $id = $ams->getSourceType() . '-' . $ams->getSourceId();
53 $status = $ams->isEnabled() ? $this->lng->txt('enabled') : $this->lng->txt('disabled');
54
55 $this->tpl->setVariable("ID", $id);
56 $this->tpl->setVariable("TYPE", $this->lng->txt($ams->getSourceType()));
57 $this->tpl->setVariable("TITLE", $title);
58 $this->tpl->setVariable("EDITOR", $usr);
59 $this->tpl->setVariable("LAST_EDITED", $ams->getLastEdited()->format('Y/m/d H:i:s'));
60 $this->tpl->setVariable("STATUS", $status);
61 $this->tpl->setVariable("ACTIONS", $actions);
62 }
63}
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