aboutsummaryrefslogtreecommitdiff
path: root/lib/Minz/Request.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Minz/Request.php')
-rw-r--r--lib/Minz/Request.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/Minz/Request.php b/lib/Minz/Request.php
index 755784522..2f745a04c 100644
--- a/lib/Minz/Request.php
+++ b/lib/Minz/Request.php
@@ -146,6 +146,31 @@ class Minz_Request {
}
}
+
+ /**
+ * Wrappers good notifications + redirection
+ * @param $msg notification content
+ * @param $url url array to where we should be forwarded
+ */
+ public static function good($msg, $url = array()) {
+ Minz_Session::_param('notification', array(
+ 'type' => 'good',
+ 'content' => $msg
+ ));
+
+ Minz_Request::forward($url, true);
+ }
+
+ public static function bad($msg, $url = array()) {
+ Minz_Session::_param('notification', array(
+ 'type' => 'bad',
+ 'content' => $msg
+ ));
+
+ Minz_Request::forward($url, true);
+ }
+
+
/**
* Permet de récupérer une variable de type $_GET
* @param $param nom de la variable