19 declare(strict_types=1);
43 private readonly array $channels,
44 private readonly array $usr_data,
45 private readonly
bool $adminMode =
false,
48 if ($language ===
null) {
50 $language = $DIC->language();
54 $this->
language->loadLanguageModule(
'notification');
59 $this->
setId(
'notifications_settings');
63 foreach ($channels as $channel) {
66 'notc_' . $channel[
'title']
75 $this->
setRowTemplate(
'tpl.type_line.html',
'components/ILIAS/Notifications');
89 protected function fillRow(array $a_set): void
91 $this->tpl->setVariable(
'NOTIFICATION_TARGET', $this->
language->txt(
'nott_' . $a_set[
'title']));
93 foreach ($this->channels as $channeltype => $channel) {
94 if (array_key_exists($a_set[
'name'], $this->usr_data) && in_array(
96 $this->usr_data[$a_set[
'name']],
99 $this->tpl->touchBlock(
'notification_cell_checked');
103 $this->tpl->touchBlock(
'notification_cell_disabled');
106 $this->tpl->setCurrentBlock(
'notification_cell');
110 isset($channel[
'config_type'], $a_set[
'config_type']) &&
111 $channel[
'config_type'] ===
'set_by_user' &&
112 $a_set[
'config_type'] ===
'set_by_user' 114 $this->tpl->setVariable(
'NOTIFICATION_SET_BY_USER_CELL',
'optionSetByUser');
117 $this->tpl->setVariable(
'CHANNEL', $channeltype);
118 $this->tpl->setVariable(
'TYPE', $a_set[
'name']);
120 $this->tpl->parseCurrentBlock();
readonly ilLanguage $language
setSelectAllCheckbox(string $a_select_all_checkbox, bool $a_select_all_on_top=false)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
__construct(ilNotificationGUI $a_ref, string $title, private readonly array $channels, private readonly array $usr_data, private readonly bool $adminMode=false, ?ilLanguage $language=null)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
setEditable(bool $editable)
__construct(Container $dic, ilPlugin $plugin)
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)
language()
description: > Example for rendring a language glyph.