summaryrefslogtreecommitdiff
path: root/includes/helper/message_helper.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/helper/message_helper.php')
-rw-r--r--includes/helper/message_helper.php37
1 files changed, 29 insertions, 8 deletions
diff --git a/includes/helper/message_helper.php b/includes/helper/message_helper.php
index a085aa0e..613ac32e 100644
--- a/includes/helper/message_helper.php
+++ b/includes/helper/message_helper.php
@@ -2,6 +2,8 @@
/**
* Gibt zwischengespeicherte Fehlermeldungen zurück und löscht den Zwischenspeicher
+ *
+ * @return string
*/
function msg()
{
@@ -15,34 +17,51 @@ function msg()
/**
* Rendert eine Information
+ *
+ * @param string $msg
+ * @param bool $immediately
+ * @return string
*/
-function info($msg, $immediatly = false)
+function info($msg, $immediately = false)
{
- return alert('info', $msg, $immediatly);
+ return alert('info', $msg, $immediately);
}
/**
* Rendert eine Fehlermeldung
+ *
+ * @param string $msg
+ * @param bool $immediately
+ * @return string
*/
-function error($msg, $immediatly = false)
+function error($msg, $immediately = false)
{
- return alert('danger', $msg, $immediatly);
+ return alert('danger', $msg, $immediately);
}
/**
* Rendert eine Erfolgsmeldung
+ *
+ * @param string $msg
+ * @param bool $immediately
+ * @return string
*/
-function success($msg, $immediatly = false)
+function success($msg, $immediately = false)
{
- return alert('success', $msg, $immediatly);
+ return alert('success', $msg, $immediately);
}
/**
* Renders an alert with given alert-* class.
+ *
+ * @param string $class
+ * @param string $msg
+ * @param bool $immediately
+ * @return string|null
*/
-function alert($class, $msg, $immediatly = false)
+function alert($class, $msg, $immediately = false)
{
- if ($immediatly) {
+ if ($immediately) {
if ($msg == "") {
return "";
}
@@ -53,4 +72,6 @@ function alert($class, $msg, $immediatly = false)
$_SESSION['msg'] = "";
}
$_SESSION['msg'] .= alert($class, $msg, true);
+
+ return null;
}