Copied!

NotificationServiceDecorator

NotificationServiceDecorator.php : 16
Implements NotificationService

Properties

protected $innerService

NotificationServiceDecorator.php : 19
protected NotificationService $innerService

Methods

public__construct()

NotificationServiceDecorator.php : 21
public __construct(NotificationService $innerService)

Parameters

Name Type Default value Description
$innerService NotificationService - -

publiccreateNotification()

NotificationServiceDecorator.php : 53

Creates a new notification.

public createNotification(CreateStruct $createStruct) : Notification

Parameters

Name Type Default value Description
$createStruct CreateStruct - -

Return values

Notification

publicdeleteNotification()

NotificationServiceDecorator.php : 58

Deletes a notification.

public deleteNotification(Notification $notification) : void

Parameters

Name Type Default value Description
$notification Notification - -

publicgetNotification()

NotificationServiceDecorator.php : 33

Load single notification (by ID).

public getNotification(int $notificationId) : Notification

Parameters

Name Type Default value Description
$notificationId int -

Notification ID

Return values

Notification

publicgetNotificationCount()

NotificationServiceDecorator.php : 48

Get count of total users notifications.

public getNotificationCount() : int

Return values

int

publicgetPendingNotificationCount()

NotificationServiceDecorator.php : 43

Get count of unread users notifications.

public getPendingNotificationCount() : int

Return values

int

publicloadNotifications()

NotificationServiceDecorator.php : 26

Get currently logged user notifications.

public loadNotifications(int $offset, int $limit) : NotificationList

Parameters

Name Type Default value Description
$offset int -

the start offset for paging

$limit int -

the number of notifications returned

Return values

NotificationList

publicmarkNotificationAsRead()

NotificationServiceDecorator.php : 38

Mark notification as read so it no longer bother the user.

public markNotificationAsRead(Notification $notification) : void

Parameters

Name Type Default value Description
$notification Notification - -