1 | <?php |
||
11 | class NotificationService implements NotificationServiceInterface |
||
12 | { |
||
13 | /** @var \eZ\Publish\API\Repository\NotificationService */ |
||
14 | protected $service; |
||
15 | |||
16 | /** |
||
17 | * Construct service object from aggregated service. |
||
18 | * |
||
19 | * @param \eZ\Publish\API\Repository\NotificationService $service |
||
20 | */ |
||
21 | public function __construct( |
||
26 | |||
27 | /** |
||
28 | * Get currently logged user notifications. |
||
29 | * |
||
30 | * @param int $offset |
||
31 | * @param int $limit |
||
32 | * |
||
33 | * @return \eZ\Publish\API\Repository\Values\Notification\NotificationList |
||
34 | */ |
||
35 | public function loadNotifications(int $offset, int $limit): NotificationList |
||
39 | |||
40 | /** |
||
41 | * @param int $notificationId |
||
42 | * |
||
43 | * @return \eZ\Publish\API\Repository\Values\Notification\Notification |
||
44 | */ |
||
45 | public function getNotification(int $notificationId): Notification |
||
49 | |||
50 | /** |
||
51 | * Mark notification as read so it no longer bother the user. |
||
52 | * |
||
53 | * @param \eZ\Publish\API\Repository\Values\Notification\Notification $notification |
||
54 | */ |
||
55 | public function markNotificationAsRead(Notification $notification): void |
||
59 | |||
60 | /** |
||
61 | * Get count of unread users notifications. |
||
62 | * |
||
63 | * @return int |
||
64 | */ |
||
65 | public function getPendingNotificationCount(): int |
||
69 | |||
70 | /** |
||
71 | * Get count of total users notifications. |
||
72 | * |
||
73 | * @return int |
||
74 | */ |
||
75 | public function getNotificationCount(): int |
||
79 | |||
80 | /** |
||
81 | * @param \eZ\Publish\API\Repository\Values\Notification\Notification $notification |
||
82 | */ |
||
83 | public function deleteNotification(Notification $notification): void |
||
87 | |||
88 | /** |
||
89 | * @param \eZ\Publish\API\Repository\Values\Notification\CreateStruct $createStruct |
||
90 | * |
||
91 | * @return \eZ\Publish\API\Repository\Values\Notification\Notification |
||
92 | */ |
||
93 | public function createNotification(CreateStruct $createStruct): Notification |
||
97 | } |
||
98 |