Skip to content

Commit

Permalink
[TASK] Extend ModifyUserMessageAttachmentsEvent
Browse files Browse the repository at this point in the history
The ModifyUserMessageAttachmentsEvent event has been extended
with the $customNotification property. This can be used to
add attachments to email sent using the backend module.

Refs #1178
  • Loading branch information
derhansen committed Dec 6, 2023
1 parent c32e6d6 commit eb00d32
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Classes/Event/ModifyUserMessageAttachmentsEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace DERHANSEN\SfEventMgt\Event;

use DERHANSEN\SfEventMgt\Domain\Model\Dto\CustomNotification;
use DERHANSEN\SfEventMgt\Domain\Model\Registration;
use DERHANSEN\SfEventMgt\Service\NotificationService;

Expand All @@ -25,6 +26,7 @@ public function __construct(
private readonly Registration $registration,
private readonly int $type,
private readonly array $settings,
private readonly ?CustomNotification $customNotification,
private readonly NotificationService $notificationService
) {
}
Expand All @@ -49,6 +51,11 @@ public function getSettings(): array
return $this->settings;
}

public function getCustomNotification(): ?CustomNotification
{
return $this->customNotification;
}

public function getNotificationService(): NotificationService
{
return $this->notificationService;
Expand Down
1 change: 1 addition & 0 deletions Classes/Service/NotificationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ public function sendUserMessage(
$registration,
$type,
$settings,
$customNotification,
$this
);
$this->eventDispatcher->dispatch($modifyUserAttachmentsEvent);
Expand Down

0 comments on commit eb00d32

Please sign in to comment.