Notifications

Contracts

NotificationsRepositoryContract

Plugin Notifications Service

Namespace

Plenty\Modules\Notifications\Contracts

Methods

public addNotification(array $notificationBuiltWithNotificationBuilder):array

Add a Notification in the system

Parameters
array $notificationBuiltWithNotificationBuilder An array built with NotificationBuilder::build() method
public fetchNotifications(array $queryBuiltWithNotificationsQueryBuilder, int $page, int $itemsPerPage):UnspecifiedLengthPaginationResponse

Fetch a list of short/incomplete notifications, containing only the subject. To be used for listing purposes.

Parameters
array $queryBuiltWithNotificationsQueryBuilder An array built with NotificationsQueryBuilder::build() method
int $page The page number, starting from 1
int $itemsPerPage The number of notifications per page
public fetchNotificationsDetails(array $notificationsFetchDetailsQuery):array

Fetch all the details of a Notification based on its id.

Parameters
array $notificationsFetchDetailsQuery An array built with NotificationsFetchDetailsQueryBuilder::build() method
public acknowledgeNotifications(array $queryBuiltWithNotificationsAcknowledgeQueryBuilder):bool

Mark a Notification as acknowledged.

Parameters
array $queryBuiltWithNotificationsAcknowledgeQueryBuilder An array built with NotificationsAcknowledgeQueryBuilder::build() method
public getNotificationsCount(array $queryBuiltWithNotificationsQueryBuilder):int

Retrieve the current unread Notifications count

Parameters
array $queryBuiltWithNotificationsQueryBuilder An array built with NotificationsQueryBuilder::build() method

Models

Notification

The Notification Model

Namespace

Plenty\Modules\Notifications\Models

Methods

public toArray()

Returns this model as an array.

NotificationContent

The Notification Content model

Namespace

Plenty\Modules\Notifications\Models

Methods

public toArray()

Returns this model as an array.