61 $this->notification_groups = $DIC->globalScreen()->collector()->notifications()->getNotifications();
62 $this->identifiers_to_handle = $DIC->http()->request()->getQueryParams()[self::NOTIFICATION_IDENTIFIERS] ?? [];
63 $this->single_identifier_to_handle = $DIC->http()->request()->getQueryParams()[self::ITEM_ID] ?? null;
65 switch ($DIC->http()->request()->getQueryParams()[self::MODE]) {
66 case self::MODE_OPENED:
69 case self::MODE_CLOSED:
81 foreach ($this->notification_groups as $notification_group) {
82 foreach ($notification_group->getNotifications() as $notification) {
83 if (in_array($this->
hash($notification->getProviderIdentification()->serialize()), $this->identifiers_to_handle,
true)) {
84 $notification->getOpenedCallable()();
87 if (in_array($this->
hash($notification_group->getProviderIdentification()->serialize()), $this->identifiers_to_handle,
true)) {
88 $notification_group->getOpenedCallable()();
98 foreach ($this->notification_groups as $notification_group) {
99 foreach ($notification_group->getNotifications() as $notification) {
100 if ($this->single_identifier_to_handle === $this->
hash($notification->getProviderIdentification()->serialize())) {
101 if ($notification->hasClosedCallable()) {
102 $notification->getClosedCallable()();
$single_identifier_to_handle
Entry Point for Async calls from the Notification Center.
const MODE_CLOSED
Value of the MODE GET param, if the Notification Center has been closed.
const ITEM_ID
NAME of the GET param, to indicate the item ID of the closed item.
handleOpened()
Loops through all available open callable provided by the notification providers. ...
const NOTIFICATION_IDENTIFIERS
Used to read the identifiers out of the GET param later.
const MODE_OPENED
Value of the MODE GET param, if the Notification Center has been opened.
const NOTIFY_ENDPOINT
Location of the endpoint handling async notification requests.
const MODE
Name of the GET param used in the async calls.
handleClosed()
Runs the closed callable if such a callable is provided.