diff options
Diffstat (limited to 'inc/message.inc.php')
-rw-r--r-- | inc/message.inc.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/inc/message.inc.php b/inc/message.inc.php index 9409db95..238ed939 100644 --- a/inc/message.inc.php +++ b/inc/message.inc.php @@ -18,8 +18,33 @@ class Message ); } + public static function addWarning($id) + { + self::$list[] = array( + 'type' => 'warning', + 'id' => $id + ); + } + + public static function addInfo($id) + { + self::$list[] = array( + 'type' => 'info', + 'id' => $id + ); + } + + public static function addSuccess($id) + { + self::$list[] = array( + 'type' => 'success', + 'id' => $id + ); + } + public static function renderList() { + global $error_text; foreach (self::$list as $item) { Render::addTemplate('messagebox-' . $item['type'], array('message' => $error_text[$item['id']])); } |