aboutsummaryrefslogtreecommitdiff
path: root/app/class/Controller.php
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2020-04-14 16:36:45 +0200
committervincent-peugnet <v.peugnet@free.fr>2020-04-14 16:36:45 +0200
commit8ccc4ac00c974ba3659762e6c67f75ed82020e37 (patch)
treefc9a5b656ca13b34cb2eaac6e909b0b59ca839e8 /app/class/Controller.php
parentce3fcb72f2d5d154461a14183069bf87db1e5776 (diff)
downloadwcms-8ccc4ac00c974ba3659762e6c67f75ed82020e37.tar.gz
wcms-8ccc4ac00c974ba3659762e6c67f75ed82020e37.zip
finish flashmessages implementation
+ clean css
Diffstat (limited to 'app/class/Controller.php')
-rw-r--r--app/class/Controller.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/app/class/Controller.php b/app/class/Controller.php
index ccf31fa..bcfcdba 100644
--- a/app/class/Controller.php
+++ b/app/class/Controller.php
@@ -99,6 +99,20 @@ class Controller
exit;
}
+ /**
+ *
+ */
+ public function sendstatflashmessage(int $count, int $total, string $message)
+ {
+ if ($count === $total) {
+ Model::sendflashmessage($count . ' / ' . $total . ' ' . $message, 'success');
+ } elseif ($count > 0) {
+ Model::sendflashmessage($count . ' / ' . $total . ' ' . $message, 'warning');
+ } else {
+ Model::sendflashmessage($count . ' / ' . $total . ' ' . $message, 'error');
+ }
+ }
+
}