Notification hide.

This commit is contained in:
cuneytsenturk
2018-11-17 13:13:15 +03:00
parent 8b5fd52d3d
commit e78b786e42
11 changed files with 243 additions and 1 deletions

View File

@ -37,7 +37,16 @@ class Notifications
// Push to a stack
foreach ($notifications as $notification) {
$view->getFactory()->startPush('content_content_start', $notification->message);
$setting = 'notifications.'. $notification->path . '.' . $notification->id . '.status';
$path = str_replace('/', '#', $notification->path);
$message = str_replace('#path#', $path, $notification->message);
$message = str_replace('#token#', csrf_token(), $message);
if (setting($setting, 1)) {
$view->getFactory()->startPush('content_content_start', $message);
}
}
}
}