3 namespace BookStack\Activity\Notifications\MessageParts;
5 use Illuminate\Contracts\Support\Htmlable;
8 * A line of text with linked text included, intended for use
9 * in MailMessages. The line should have a ':link' placeholder for
10 * where the link should be inserted within the line.
12 class LinkedMailMessageLine implements Htmlable
14 public function __construct(
15 protected string $url,
16 protected string $line,
17 protected string $linkText,
21 public function toHtml(): string
23 $link = '<a href="' . e($this->url) . '">' . e($this->linkText) . '</a>';
24 return str_replace(':link', $link, e($this->line));