|
4 | 4 |
|
5 | 5 | class Create extends \BNETDocs\Models\Core\AccessControl implements \JsonSerializable
|
6 | 6 | {
|
7 |
| - public const ACL_NOT_SET = 'ACL_NOT_SET'; |
8 |
| - public const EMPTY_CONTENT = 'EMPTY_CONTENT'; |
9 |
| - public const EMPTY_TITLE = 'EMPTY_TITLE'; |
10 |
| - public const INTERNAL_ERROR = 'INTERNAL_ERROR'; |
| 7 | + public const ERROR_ACL_NOT_SET = 'ACL_NOT_SET'; |
| 8 | + public const ERROR_EMPTY_CONTENT = 'EMPTY_CONTENT'; |
| 9 | + public const ERROR_EMPTY_TITLE = 'EMPTY_TITLE'; |
| 10 | + public const ERROR_INTERNAL = 'INTERNAL_ERROR'; |
| 11 | + public const ERROR_NOT_LOGGED_IN = 'NOT_LOGGED_IN'; |
11 | 12 |
|
12 |
| - public ?int $category_id = null; |
13 |
| - public string $content = ''; |
14 |
| - public mixed $error = 'INTERNAL_ERROR'; |
15 |
| - public bool $markdown = false; |
16 |
| - public ?\BNETDocs\Libraries\News\Post $news_post = null; |
17 |
| - public ?array $news_categories = null; |
18 |
| - public bool $rss_exempt = false; |
19 |
| - public string $title = ''; |
| 13 | + public ?int $category_id = null; |
| 14 | + public string $content = ''; |
| 15 | + public mixed $error = 'INTERNAL_ERROR'; |
| 16 | + public bool $markdown = false; |
| 17 | + public ?\BNETDocs\Libraries\News\Post $news_post = null; |
| 18 | + public ?array $news_categories = null; |
| 19 | + public bool $rss_exempt = false; |
| 20 | + public string $title = ''; |
20 | 21 |
|
21 |
| - public function jsonSerialize(): mixed |
22 |
| - { |
23 |
| - return \array_merge(parent::jsonSerialize(), [ |
24 |
| - 'category' => $this->category_id, |
25 |
| - 'content' => $this->content, |
26 |
| - 'error' => $this->error, |
27 |
| - 'markdown' => $this->markdown, |
28 |
| - 'news_categories' => $this->news_categories, |
29 |
| - 'rss_exempt' => $this->rss_exempt, |
30 |
| - 'title' => $this->title, |
31 |
| - ]); |
32 |
| - } |
| 22 | + public function jsonSerialize(): mixed |
| 23 | + { |
| 24 | + return \array_merge(parent::jsonSerialize(), [ |
| 25 | + 'category' => $this->category_id, |
| 26 | + 'content' => $this->content, |
| 27 | + 'error' => $this->error, |
| 28 | + 'markdown' => $this->markdown, |
| 29 | + 'news_categories' => $this->news_categories, |
| 30 | + 'rss_exempt' => $this->rss_exempt, |
| 31 | + 'title' => $this->title, |
| 32 | + ]); |
| 33 | + } |
33 | 34 | }
|
0 commit comments