ILIAS
release_10 Revision v10.1-43-ga1241a92c2f
◀ ilDoc Overview
StandardNotificationRenderer.php
Go to the documentation of this file.
1
<?php
2
3
declare(strict_types=1);
20
namespace
ILIAS\GlobalScreen\Scope\Notification\Collector\Renderer
;
21
22
use
ILIAS\GlobalScreen\Client\Notifications
as ClientNotifications;
23
use
ILIAS\GlobalScreen\Scope\MainMenu\Collector\Renderer\Hasher
;
24
use
ILIAS\GlobalScreen\Scope\Notification\Factory\isItem
;
25
use
ILIAS\GlobalScreen\Scope\Notification\Factory\StandardNotification
;
26
use
ILIAS\UI\Component\Item\Notification
;
27
32
class
StandardNotificationRenderer
extends
AbstractBaseNotificationRenderer
implements
NotificationRenderer
33
{
34
use
Hasher
;
35
40
public
function
getNotificationComponentForItem
(
isItem
$item): \
ILIAS
\
UI
\
Component
\
Component
41
{
42
$ui_notification_item = $item->getNotificationItem();
43
44
if
($item->hasClosedCallable()) {
45
return
$this->
attachJSCloseEvent
($ui_notification_item, $item);
46
}
47
48
return
$ui_notification_item;
49
}
50
58
protected
function
attachJSCloseEvent
(
Notification
$ui_notification_item,
isItem
$item):
Notification
59
{
60
$url
= ClientNotifications::NOTIFY_ENDPOINT .
"?"
. $this->
buildCloseQuery
($item);
61
62
return
$ui_notification_item->
withCloseAction
(
$url
);
63
}
64
}
StandardNotification
ILIAS
Interface Observer Contains several chained tasks and infos about them.
Definition:
AccessControl.php:21
Factory
ILIAS\GlobalScreen\Scope\Notification\Collector\Renderer
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
AbstractBaseNotificationRenderer.php:20
isItem
ILIAS\UI\Component
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS\GlobalScreen\Scope\Notification\Collector\Renderer\AbstractBaseNotificationRenderer\buildCloseQuery
buildCloseQuery(isItem $item)
Definition:
AbstractBaseNotificationRenderer.php:50
$url
$url
Definition:
shib_logout.php:63
Hasher
ILIAS\GlobalScreen\Scope\Notification\Collector\Renderer\StandardNotificationRenderer
Class StandardNotificationGroupRenderer.
Definition:
StandardNotificationRenderer.php:32
Hasher
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Notification
ILIAS\GlobalScreen\Scope\Notification\Collector\Renderer\StandardNotificationRenderer\attachJSCloseEvent
attachJSCloseEvent(Notification $ui_notification_item, isItem $item)
Attaches on load code for communicating back, that the notification has been closed.
Definition:
StandardNotificationRenderer.php:58
ILIAS\GlobalScreen\Scope\Notification\Collector\Renderer\NotificationRenderer
Interface NotificationRenderer Every Notification should have a renderer, if you won't provide on in ...
Definition:
NotificationRenderer.php:34
ILIAS\UI\Component\Item\Notification
Definition:
Notification.php:31
ILIAS\UI\Component\Item\Notification\withCloseAction
withCloseAction(string $url)
Get an Item like this with an url to consulted async, when to close button is pressed.
GuzzleHttp\Client\Notifications
Definition:
Notifications.php:35
ILIAS\GlobalScreen\Scope\Notification\Collector\Renderer\StandardNotificationRenderer\getNotificationComponentForItem
getNotificationComponentForItem(isItem $item)
Definition:
StandardNotificationRenderer.php:40
ILIAS\GlobalScreen\Scope\Notification\Collector\Renderer\AbstractBaseNotificationRenderer
Class AbstractBaseNotificationRenderer.
Definition:
AbstractBaseNotificationRenderer.php:31
ILIAS\GlobalScreen\Scope\Notification\Factory\isItem
Interface isItem.
Definition:
isItem.php:30
components
ILIAS
GlobalScreen
src
Scope
Notification
Collector
Renderer
StandardNotificationRenderer.php
Generated on Wed Sep 10 2025 15:15:42 for ILIAS by
1.8.13 (using
Doxyfile
)