NotificationService
NotificationService.php
:
23
Interface
Service to manager user notifications. It works in the context of a current User (obtained from the PermissionResolver).
Methods¶
createNotification()
¶
NotificationService.php
:
84
Creates a new notification.
|
|
|
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| $createStruct | CreateStruct | - | - |
Return values
Tags
deleteNotification()
¶
NotificationService.php
:
91
Deletes a notification.
|
|
|
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| $notification | Notification | - | - |
findNotifications()
¶
NotificationService.php
:
30
|
|
|
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| $query | NotificationQuery|null | null | - |
Return values
getNotification()
¶
NotificationService.php
:
41
Load single notification (by ID).
|
|
|
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| $notificationId | int | - |
Notification ID |
Return values
Tags
getNotificationCount()
¶
NotificationService.php
:
73
|
|
|
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| $query | NotificationQuery|null | null | - |
Return values
int
getPendingNotificationCount()
¶
NotificationService.php
:
71
Get count of unread users notifications.
|
|
|
Return values
int
loadNotifications()
¶
NotificationService.php
:
25
|
|
|
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| $offset | int | - | - |
| $limit | int | - | - |
Return values
markNotificationAsRead()
¶
NotificationService.php
:
56
Mark notification as read so it no longer bother the user.
|
|
|
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| $notification | Notification | - | - |
Tags
markNotificationAsUnread()
¶
NotificationService.php
:
64
Marks the given notification as unread so it is shown again as new to the user.
|
|
|
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| $notification | Notification | - | - |
Tags
markUserNotificationsAsRead()
¶
NotificationService.php
:
46
|
|
|
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| $notificationIds | array<string|int, int> | [] | - |