◆ __construct()
Definition at line 41 of file class.ilNotificationGUI.php.
References $controller, $DIC, $dic, $language, $template, $user, ILIAS\DI\Container\ctrl(), ILIAS\UI\examples\Symbol\Glyph\Language\language(), ILIAS\DI\Container\language(), ILIAS\DI\Container\ui(), ILIAS\Repository\user(), and ILIAS\DI\Container\user().
user()
Get the current user.
language()
Get interface to the i18n service.
ilCtrlInterface $controller
ilGlobalTemplateInterface $template
ctrl()
Get the interface to the control structure.
ui()
Get the interface to get services from UI framework.
◆ _forwards()
static ilNotificationGUI::_forwards |
( |
| ) |
|
|
static |
◆ addHandler()
Definition at line 127 of file class.ilNotificationGUI.php.
References $handler.
129 if (!array_key_exists($channel, $this->handler) || !is_array($this->handler[$channel])) {
130 $this->handler[$channel] = [];
133 $this->handler[$channel][] =
$handler;
◆ executeCommand()
ilNotificationGUI::executeCommand |
( |
| ) |
|
Definition at line 80 of file class.ilNotificationGUI.php.
82 if (!$this->controller->getCmd()) {
86 $cmd = $this->controller->getCmd() .
'Object';
◆ getAvailableChannels()
ilNotificationGUI::getAvailableChannels |
( |
array |
$types = [] | ) |
|
|
private |
◆ getAvailableTypes()
ilNotificationGUI::getAvailableTypes |
( |
array |
$types = [] | ) |
|
|
private |
◆ getHandler()
ilNotificationGUI::getHandler |
( |
string |
$type | ) |
|
◆ getOSDNotificationsObject()
ilNotificationGUI::getOSDNotificationsObject |
( |
| ) |
|
Definition at line 108 of file class.ilNotificationGUI.php.
References ilSession\enableWebAccessWithoutSession().
112 foreach ($this->dic->globalScreen()->collector()->toasts()->getToasts() as $toast) {
113 $renderer = $toast->getRenderer();
114 $toasts[] = $renderer->getToastComponentForItem($toast);
117 $this->dic->http()->saveResponse(
118 $this->dic->http()->response()
119 ->withBody(Streams::ofString(
120 $this->dic->ui()->renderer()->renderAsync($toasts)
123 $this->dic->http()->sendResponse();
124 $this->dic->http()->close();
static enableWebAccessWithoutSession(bool $enable_web_access_without_session)
◆ showSettingsObject()
ilNotificationGUI::showSettingsObject |
( |
| ) |
|
Definition at line 136 of file class.ilNotificationGUI.php.
References getAvailableChannels(), getAvailableTypes(), ILIAS\UI\examples\Symbol\Glyph\Language\language(), ilCheckboxInputGUI\setValue(), and ILIAS\Repository\user().
138 $userTypes = ilNotificationDatabaseHandler::loadUserConfig($this->
user->getId());
140 $this->
language->loadLanguageModule(
'notification');
143 $chk =
new ilCheckboxInputGUI($this->
language->txt(
'enable_custom_notification_configuration'),
'enable_custom_notification_configuration');
145 $chk->setChecked($this->dic->refinery()->kindlyTo()->int()->transform($this->
user->getPref(
'use_custom_notification_setting')) === 1);
146 $form->addItem($chk);
148 $form->setFormAction($this->controller->getFormAction($this,
'showSettingsObject'));
149 $form->addCommandButton(
'saveCustomizingOption', $this->
language->txt(
'save'));
150 $form->addCommandButton(
'showSettings', $this->
language->txt(
'cancel'));
154 $table->setFormAction($this->controller->getFormAction($this,
'saveSettings'));
158 $this->dic->refinery()->kindlyTo()->int()->transform(
159 $this->
user->getPref(
'use_custom_notification_setting')
162 $table->addCommandButton(
'saveSettings', $this->
language->txt(
'save'));
163 $table->addCommandButton(
'showSettings', $this->
language->txt(
'cancel'));
164 $table->setEditable(
true);
166 $table->setEditable(
false);
169 $this->
template->setContent($form->getHtml() . $table->getHTML());
getAvailableChannels(array $types=[])
getAvailableTypes(array $types=[])
◆ $controller
◆ $dic
◆ $handler
array ilNotificationGUI::$handler = [] |
|
private |
◆ $language
◆ $template
◆ $user
The documentation for this class was generated from the following file: