ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilCalendarSharedUserListTableGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
26{
27 protected array $user_ids = array();
28
29 public function __construct(object $parent_obj, string $parent_cmd)
30 {
32
33 $this->setRowTemplate('tpl.calendar_shared_user_list_row.html', 'components/ILIAS/Calendar');
34
35 $this->addColumn('', 'id', '1px');
36 $this->addColumn($this->lng->txt('name'), 'last_firstname', '60%');
37 $this->addColumn($this->lng->txt('login'), 'login', '40%');
38
39 $this->addMultiCommand('shareAssign', $this->lng->txt('cal_share_cal'));
40 $this->addMultiCommand('shareAssignEditable', $this->lng->txt('cal_share_cal_editable'));
41 $this->setSelectAllCheckbox('user_ids');
42 $this->setPrefix('search');
43 }
44
45 public function setUsers(array $a_user_ids)
46 {
47 $this->user_ids = $a_user_ids;
48 }
49
50 protected function fillRow(array $a_set): void
51 {
52 $this->tpl->setVariable('VAL_ID', $a_set['id']);
53
54 $this->tpl->setVariable('LASTNAME', $a_set['lastname']);
55 $this->tpl->setVariable('FIRSTNAME', $a_set['firstname']);
56 $this->tpl->setVariable('LOGIN', $a_set['login']);
57 }
58
59 public function parse(): void
60 {
61 $users = array();
62 foreach ($this->user_ids as $id) {
63 $id = (int) $id;
65
66 $tmp_data['id'] = $id;
67 $tmp_data['lastname'] = $name['lastname'];
68 $tmp_data['firstname'] = $name['firstname'];
69 $tmp_data['login'] = ilObjUser::_lookupLogin($id);
70 $tmp_data['last_firstname'] = $tmp_data['lastname'] . $tmp_data['firstname'] . $tmp_data['login'];
71
72 $users[] = $tmp_data;
73 }
74 $this->setData($users);
75 }
76}
__construct(object $parent_obj, string $parent_cmd)
fillRow(array $a_set)
Standard Version of Fill Row.
static _lookupName(int $a_user_id)
static _lookupLogin(int $a_user_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addMultiCommand(string $a_cmd, string $a_text)
setPrefix(string $a_prefix)
set prefix for sort and offset fields (if you have two or more tables on a page that you want to sort...
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)
setSelectAllCheckbox(string $a_select_all_checkbox, bool $a_select_all_on_top=false)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setData(array $a_data)
Set table data.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc