AdminNotice.php
26 lines
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace AC\Message; |
| 6 | |
| 7 | use AC\View; |
| 8 | |
| 9 | class AdminNotice extends Notice |
| 10 | { |
| 11 | public function render(): string |
| 12 | { |
| 13 | $data = [ |
| 14 | 'message' => $this->message, |
| 15 | 'type' => $this->type, |
| 16 | 'id' => $this->id, |
| 17 | ]; |
| 18 | |
| 19 | $view = new View($data); |
| 20 | $view->set_template('message/notice/admin'); |
| 21 | |
| 22 | return $view->render(); |
| 23 | } |
| 24 | |
| 25 | } |
| 26 |