19 declare(strict_types=1);
    36         $this->ui_factory = $DIC->ui()->factory();
    37         $this->ui_renderer = $DIC->ui()->renderer();
    39         $this->
lng = $DIC->language();
    40         $this->
ctrl = $DIC->ctrl();
    42         $this->
setId(
'frmev_' . $settings_gui->
getRefId() . substr($type, 0, 3));
    46         $this->
setTitle($this->
lng->txt(strtolower($type)));
    47         $this->
setRowTemplate(
'tpl.forums_members_row.html', 
'Modules/Forum');
    52         $this->
addColumn($this->
lng->txt(
'firstname'), 
'', 
'20%');
    53         $this->
addColumn($this->
lng->txt(
'lastname'), 
'', 
'20%');
    54         $this->
addColumn($this->
lng->txt(
'allow_user_toggle_noti'), 
'', 
'20%');
    58         $this->
addMultiCommand(
'enableHideUserToggleNoti', $this->
lng->txt(
'enable_hide_user_toggle'));
    59         $this->
addMultiCommand(
'disableHideUserToggleNoti', $this->
lng->txt(
'disable_hide_user_toggle'));
    62     private function getIcon(
int $user_toggle_noti): string
    64         $icon_ok = $this->ui_factory->symbol()->icon()->custom(
    66             $this->
lng->txt(
'enabled')
    68         $icon_not_ok = $this->ui_factory->symbol()->icon()->custom(
    70             $this->
lng->txt(
'disabled')
    72         $icon = $user_toggle_noti === 0 ? $icon_ok : $icon_not_ok;
    74         return $this->ui_renderer->render(
$icon);
    77     protected function fillRow(array $a_set): void
    79         $this->tpl->setVariable(
'VAL_USER_ID', $a_set[
'user_id']);
    80         $this->tpl->setVariable(
'VAL_LOGIN', $a_set[
'login']);
    81         $this->tpl->setVariable(
'VAL_FIRSTNAME', $a_set[
'firstname']);
    82         $this->tpl->setVariable(
'VAL_LASTNAME', $a_set[
'lastname']);
    84         $icon_ok = $this->
getIcon((
int) $a_set[
'user_toggle_noti']);
    85         $this->tpl->setVariable(
'VAL_USER_TOGGLE_NOTI', $icon_ok);
    92         $interested_events = $row[
'interested_events'];
    95             $this->
ctrl->getFormAction($this->parent_obj, 
'saveEventsForUser'),
    97                 'hidden_value' => json_encode([
    98                     'usr_id' => $row[
'usr_id_events']
    99                 ], JSON_THROW_ON_ERROR),
   113         $notificationsModal = $this->ui_factory->modal()->roundtrip(
   114             $this->
lng->txt(
'notification_settings'),
   116         )->withActionButtons([
   117             $this->ui_factory->button()
   118                 ->primary($this->
lng->txt(
'save'), 
'#')
   121                         $('#$id').closest('.modal').find('form').addClass('ilForumNotificationSettingsForm');   122                         $('#$id').closest('.modal').find('form .il-standard-form-header, .il-standard-form-footer').remove();   123                         $('#$id').click(function() { $(this).closest('.modal').find('form').submit(); return false; });   128         $showNotificationSettingsBtn = $this->ui_factory->button()
   129             ->shy($this->
lng->txt(
'notification_settings'), 
'#')
   131                 $notificationsModal->getShowSignal()
   134         $this->notification_modals[] = $notificationsModal;
   136         $this->tpl->setVariable(
'VAL_NOTIFICATION', $this->ui_renderer->render($showNotificationSettingsBtn));
   141         return parent::render() . $this->ui_renderer->render($this->notification_modals);
 
setFormAction(string $a_form_action, bool $a_multipart=false)
 
__construct(ilForumSettingsGUI $settings_gui, string $cmd, string $type)
 
getIcon(int $user_toggle_noti)
 
setSelectAllCheckbox(string $a_select_all_checkbox, bool $a_select_all_on_top=false)
 
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory) 
 
ILIAS UI Factory $ui_factory
 
Class ilForumSettingsGUI. 
 
ILIAS UI Renderer $ui_renderer
 
populateWithModal(array $row)
 
withOnLoadCode(Closure $binder)
 
eventsFormBuilder(array $row)
 
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template. 
 
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
 
Class ilForumNotificationTableGUI. 
 
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)
 
addMultiCommand(string $a_cmd, string $a_text)
 
array $notification_modals