1 | <?php namespace Arcanesoft\Blog\Entities; |
||
11 | class PostStatus |
||
12 | { |
||
13 | /* ----------------------------------------------------------------- |
||
14 | | Constants |
||
15 | | ----------------------------------------------------------------- |
||
16 | */ |
||
17 | |||
18 | const STATUS_DRAFT = 'draft'; |
||
19 | const STATUS_PUBLISHED = 'published'; |
||
20 | |||
21 | /* ----------------------------------------------------------------- |
||
22 | | Main Methods |
||
23 | | ----------------------------------------------------------------- |
||
24 | */ |
||
25 | |||
26 | /** |
||
27 | * Get all posts status keys. |
||
28 | * |
||
29 | * @return \Illuminate\Support\Collection |
||
30 | */ |
||
31 | 42 | public static function keys() |
|
32 | { |
||
33 | 42 | return new Collection([ |
|
|
|||
34 | 42 | static::STATUS_DRAFT, |
|
35 | 42 | static::STATUS_PUBLISHED, |
|
36 | ]); |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * Get all posts status |
||
41 | * |
||
42 | * @param string|null $locale |
||
43 | * |
||
44 | * @return \Illuminate\Support\Collection |
||
45 | */ |
||
46 | public static function all($locale = null) |
||
52 | |||
53 | /** |
||
54 | * Get a post status. |
||
55 | * |
||
56 | * @param string $key |
||
57 | * @param mixed $default |
||
58 | * @param string|null $locale |
||
59 | * |
||
60 | * @return string|null |
||
61 | */ |
||
62 | 27 | public static function get($key, $default = null, $locale = null) |
|
66 | } |
||
67 |
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.