NotificationService
NotificationService.php
:
19
Service to manager user notifications. It works in the context of a current User (obtained from the PermissionResolver).
Methods¶
createNotification() ¶
NotificationService.php
:
75
Creates a new notification.
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$createStruct | CreateStruct | - | - |
Return values
Tags
deleteNotification() ¶
NotificationService.php
:
82
Deletes a notification.
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$notification | Notification | - | - |
getNotification() ¶
NotificationService.php
:
40
Load single notification (by ID).
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$notificationId | int | - |
Notification ID |
Return values
Tags
getNotificationCount() ¶
NotificationService.php
:
64
Get count of total users notifications.
|
|
Return values
int
getPendingNotificationCount() ¶
NotificationService.php
:
57
Get count of unread users notifications.
|
|
Return values
int
loadNotifications() ¶
NotificationService.php
:
29
Get currently logged user notifications.
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$offset | int | - |
the start offset for paging |
$limit | int | - |
the number of notifications returned |
Return values
markNotificationAsRead() ¶
NotificationService.php
:
50
Mark notification as read so it no longer bother the user.
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$notification | Notification | - | - |