ILIAS
trunk Revision v11.0_alpha-2645-g16283d3b3f8
◀ ilDoc Overview
StandardNotificationRenderer.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\GlobalScreen\Scope\Notification\Collector\Renderer
;
22
23
use
ILIAS\UI\Component\Component
;
24
use
ILIAS\GlobalScreen\Client\Notifications
as ClientNotifications;
25
use
ILIAS\GlobalScreen\Scope\MainMenu\Collector\Renderer\Hasher
;
26
use
ILIAS\GlobalScreen\Scope\Notification\Factory\isItem
;
27
use
ILIAS\UI\Component\Item\Notification
;
28
33
class
StandardNotificationRenderer
extends
AbstractBaseNotificationRenderer
implements
NotificationRenderer
34
{
35
use
Hasher
;
36
41
public
function
getNotificationComponentForItem
(
isItem
$item):
Component
42
{
43
$ui_notification_item = $item->getNotificationItem();
44
45
if
($item->hasClosedCallable()) {
46
return
$this->
attachJSCloseEvent
($ui_notification_item, $item);
47
}
48
49
return
$ui_notification_item;
50
}
51
59
protected
function
attachJSCloseEvent
(
Notification
$ui_notification_item,
isItem
$item):
Notification
60
{
61
$url
= ClientNotifications::NOTIFY_ENDPOINT .
"?"
. $this->
buildCloseQuery
($item);
62
63
return
$ui_notification_item->
withCloseAction
(
$url
);
64
}
65
}
ILIAS\GlobalScreen\Scope\Notification\Collector\Renderer
Definition:
AbstractBaseNotificationRenderer.php:21
isItem
ILIAS\UI\Component
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:48
$url
$url
Definition:
shib_logout.php:68
Hasher
ILIAS\GlobalScreen\Scope\Notification\Collector\Renderer\StandardNotificationRenderer
Class StandardNotificationGroupRenderer.
Definition:
StandardNotificationRenderer.php:33
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:59
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:36
ILIAS\GlobalScreen\Scope\Notification\Collector\Renderer\StandardNotificationRenderer\getNotificationComponentForItem
getNotificationComponentForItem(isItem $item)
Definition:
StandardNotificationRenderer.php:41
ILIAS\GlobalScreen\Scope\Notification\Collector\Renderer\AbstractBaseNotificationRenderer
Class AbstractBaseNotificationRenderer.
Definition:
AbstractBaseNotificationRenderer.php:32
ILIAS\GlobalScreen\Scope\Notification\Factory\isItem
Interface isItem.
Definition:
isItem.php:30
components
ILIAS
GlobalScreen
src
Scope
Notification
Collector
Renderer
StandardNotificationRenderer.php
Generated on Mon Sep 1 2025 23:03:12 for ILIAS by
1.8.13 (using
Doxyfile
)