3 namespace BookStack\Activity\Notifications\MessageParts;
5 use Illuminate\Contracts\Support\Htmlable;
9 * A bullet point list of content, where the keys of the given list array
10 * are bolded header elements, and the values follow.
12 class ListMessageLine implements Htmlable, Stringable
14 public function __construct(
19 public function toHtml(): string
22 foreach ($this->list as $header => $content) {
23 $list[] = '<strong>' . e($header) . '</strong> ' . e($content);
25 return implode("<br>\n", $list);
28 public function __toString(): string
31 foreach ($this->list as $header => $content) {
32 $list[] = $header . ' ' . $content;
34 return implode("\n", $list);