1 | <?php |
||
11 | final class Notice |
||
12 | { |
||
13 | use Singleton; |
||
14 | |||
15 | /** |
||
16 | * @traitDoc |
||
17 | */ |
||
18 | public function initializes() |
||
22 | |||
23 | /** |
||
24 | * Type of notice, it can be 'success', 'error', 'warning', 'info'. |
||
25 | */ |
||
26 | private $type; |
||
27 | |||
28 | /** |
||
29 | * Message of the notice |
||
30 | */ |
||
31 | private $message; |
||
32 | |||
33 | /** |
||
34 | * Add new notice to the admin dashboard. |
||
35 | * |
||
36 | * @param string $noticeMessage |
||
37 | * @param string $noticeType |
||
38 | * @since 1.0.0 |
||
39 | * @return void |
||
40 | */ |
||
41 | public function add($noticeMessage, $noticeType = 'info') |
||
48 | |||
49 | /** |
||
50 | * Display notice template to the admin dashboard. |
||
51 | * |
||
52 | * @since 1.0.0 |
||
53 | * @return \VA\Templater |
||
54 | */ |
||
55 | public function display() |
||
64 | |||
65 | /** |
||
66 | * Get all the classes of the notice |
||
67 | * |
||
68 | * @since 1.0.0 |
||
69 | * @return string |
||
70 | */ |
||
71 | private function get_classes() |
||
75 | |||
76 | /** |
||
77 | * Get the type of the notice |
||
78 | * |
||
79 | * @since 1.0.0 |
||
80 | * @return string |
||
81 | */ |
||
82 | private function get_type() |
||
86 | |||
87 | /** |
||
88 | * Get default type of the notice |
||
89 | * |
||
90 | * @since 1.0.0 |
||
91 | * @return string |
||
92 | */ |
||
93 | private function get_default_type() |
||
97 | } |