]> BookStack Code Mirror - bookstack/blob - app/Activity/Notifications/Messages/PageUpdateNotification.php
Fixed OIDC Logout
[bookstack] / app / Activity / Notifications / Messages / PageUpdateNotification.php
1 <?php
2
3 namespace BookStack\Activity\Notifications\Messages;
4
5 use BookStack\Activity\Notifications\MessageParts\ListMessageLine;
6 use BookStack\Entities\Models\Page;
7 use Illuminate\Notifications\Messages\MailMessage;
8
9 class PageUpdateNotification extends BaseActivityNotification
10 {
11     public function toMail(mixed $notifiable): MailMessage
12     {
13         /** @var Page $page */
14         $page = $this->detail;
15
16         return (new MailMessage())
17             ->subject(trans('notifications.updated_page_subject', ['pageName' => $page->getShortName()]))
18             ->line(trans('notifications.updated_page_intro', ['appName' => setting('app-name')]))
19             ->line(new ListMessageLine([
20                 trans('notifications.detail_page_name') => $page->name,
21                 trans('notifications.detail_updated_by') => $this->user->name,
22             ]))
23             ->line(trans('notifications.updated_page_debounce'))
24             ->action(trans('notifications.action_view_page'), $page->getUrl())
25             ->line($this->buildReasonFooterLine());
26     }
27 }