| 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 | 33 | public static function keys() |
|
| 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 | 24 | public static function get($key, $default = null, $locale = null) |
|
| 66 | } |
||
| 67 |