|
2 | 2 |
|
3 | 3 | namespace BNETDocs\Models\News; |
4 | 4 |
|
5 | | -class Edit extends \BNETDocs\Models\ActiveUser |
| 5 | +class Edit extends \BNETDocs\Models\ActiveUser implements \JsonSerializable |
6 | 6 | { |
7 | | - public bool $acl_allowed = false; |
8 | | - public ?int $category = null; |
9 | | - public ?array $comments = null; |
10 | | - public ?string $content = null; |
11 | | - public bool $markdown = false; |
12 | | - public ?array $news_categories = null; |
13 | | - public ?\BNETDocs\Libraries\News\Post $news_post = null; |
14 | | - public ?int $news_post_id = null; |
15 | | - public bool $published = false; |
16 | | - public bool $rss_exempt = true; |
17 | | - public ?string $title = null; |
| 7 | + public bool $acl_allowed = false; |
| 8 | + public ?int $category = null; |
| 9 | + public ?array $comments = null; |
| 10 | + public ?string $content = null; |
| 11 | + public bool $markdown = false; |
| 12 | + public ?array $news_categories = null; |
| 13 | + public ?\BNETDocs\Libraries\News\Post $news_post = null; |
| 14 | + public ?int $news_post_id = null; |
| 15 | + public bool $published = false; |
| 16 | + public bool $rss_exempt = true; |
| 17 | + public ?string $title = null; |
| 18 | + |
| 19 | + public function jsonSerialize(): mixed |
| 20 | + { |
| 21 | + return \array_merge(parent::jsonSerialize(), [ |
| 22 | + 'acl_allowed' => $this->acl_allowed, |
| 23 | + 'category' => $this->category, |
| 24 | + 'comments' => $this->comments, |
| 25 | + 'content' => $this->content, |
| 26 | + 'markdown' => $this->markdown, |
| 27 | + 'news_categories' => $this->news_categories, |
| 28 | + 'news_post' => $this->news_post, |
| 29 | + 'news_post_id' => $this->news_post_id, |
| 30 | + 'published' => $this->published, |
| 31 | + 'rss_exempt' => $this->rss_exempt, |
| 32 | + 'title' => $this->title, |
| 33 | + ]); |
| 34 | + } |
18 | 35 | } |
0 commit comments