3 namespace BookStack\Activity\Notifications\Messages;
5 use BookStack\Activity\Models\Loggable;
6 use BookStack\Activity\Notifications\MessageParts\LinkedMailMessageLine;
7 use BookStack\App\MailNotification;
8 use BookStack\Translation\LocaleDefinition;
9 use BookStack\Users\Models\User;
10 use Illuminate\Bus\Queueable;
12 abstract class BaseActivityNotification extends MailNotification
16 public function __construct(
17 protected Loggable|string $detail,
23 * Get the array representation of the notification.
25 * @param mixed $notifiable
28 public function toArray($notifiable)
31 'activity_detail' => $this->detail,
32 'activity_creator' => $this->user,
37 * Build the common reason footer line used in mail messages.
39 protected function buildReasonFooterLine(LocaleDefinition $locale): LinkedMailMessageLine
41 return new LinkedMailMessageLine(
42 url('/preferences/notifications'),
43 $locale->trans('notifications.footer_reason'),
44 $locale->trans('notifications.footer_reason_link'),