|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
declare(strict_types=1); |
|
4
|
|
|
|
|
5
|
|
|
namespace eZ\Publish\Core\Event; |
|
6
|
|
|
|
|
7
|
|
|
use Symfony\Component\EventDispatcher\EventDispatcherInterface; |
|
8
|
|
|
use eZ\Publish\API\Repository\NotificationService as NotificationServiceInterface; |
|
9
|
|
|
use eZ\Publish\API\Repository\Values\Notification\CreateStruct; |
|
10
|
|
|
use eZ\Publish\API\Repository\Values\Notification\Notification; |
|
11
|
|
|
use eZ\Publish\API\Repository\Values\Notification\NotificationList; |
|
12
|
|
|
|
|
13
|
|
|
class NotificationService implements NotificationServiceInterface |
|
14
|
|
|
{ |
|
15
|
|
|
/** @var Symfony\Component\EventDispatcher\EventDispatcherInterface */ |
|
16
|
|
|
protected $eventDispatcher; |
|
17
|
|
|
|
|
18
|
|
|
public function __construct(NotificationServiceInterface $innerService, EventDispatcherInterface $eventDispatcher) |
|
|
|
|
|
|
19
|
|
|
{ |
|
20
|
|
|
parent::__construct($innerRepository); |
|
|
|
|
|
|
21
|
|
|
|
|
22
|
|
|
$this->eventDispatcher = $eventDispatcher; |
|
|
|
|
|
|
23
|
|
|
} |
|
24
|
|
|
|
|
25
|
|
|
public function loadNotifications(int $offset, int $limit): NotificationList |
|
26
|
|
|
{ |
|
27
|
|
|
return parent::loadNotifications($offset, $limit); |
|
28
|
|
|
} |
|
29
|
|
|
|
|
30
|
|
|
public function getNotification(int $notificationId): Notification |
|
31
|
|
|
{ |
|
32
|
|
|
return parent::getNotification($notificationId); |
|
33
|
|
|
} |
|
34
|
|
|
|
|
35
|
|
|
public function markNotificationAsRead(Notification $notification): void |
|
36
|
|
|
{ |
|
37
|
|
|
parent::markNotificationAsRead($notification); |
|
38
|
|
|
} |
|
39
|
|
|
|
|
40
|
|
|
public function getPendingNotificationCount(): int |
|
41
|
|
|
{ |
|
42
|
|
|
return parent::getPendingNotificationCount(); |
|
43
|
|
|
} |
|
44
|
|
|
|
|
45
|
|
|
public function getNotificationCount(): int |
|
46
|
|
|
{ |
|
47
|
|
|
return parent::getNotificationCount(); |
|
48
|
|
|
} |
|
49
|
|
|
|
|
50
|
|
|
public function createNotification(CreateStruct $createStruct): Notification |
|
51
|
|
|
{ |
|
52
|
|
|
return parent::createNotification($createStruct); |
|
53
|
|
|
} |
|
54
|
|
|
|
|
55
|
|
|
public function deleteNotification(Notification $notification): void |
|
56
|
|
|
{ |
|
57
|
|
|
parent::deleteNotification($notification); |
|
58
|
|
|
} |
|
59
|
|
|
} |
|
60
|
|
|
|
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.