mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
notification: add notification sent to widget which list notifications
ont an entity
This commit is contained in:
@@ -36,11 +36,13 @@ class NotificationPresence
|
||||
*/
|
||||
public function getNotificationsForClassAndEntity(string $relatedEntityClass, int $relatedEntityId): array
|
||||
{
|
||||
if ($this->security->getUser() instanceof User) {
|
||||
return $this->notificationRepository->findNotificationAsAddresseeByRelatedEntityAndUser(
|
||||
$user = $this->security->getUser();
|
||||
|
||||
if ($user instanceof User) {
|
||||
return $this->notificationRepository->findNotificationByRelatedEntityAndUserAssociated(
|
||||
$relatedEntityClass,
|
||||
$relatedEntityId,
|
||||
$this->security->getUser()
|
||||
$user
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user