Winter CMS plugin that allows to display notifications in the backend.
  • PHP 64.8%
  • HTML 22.9%
  • JavaScript 11.7%
  • CSS 0.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2025-09-30 09:41:54 +02:00
assets only pushes a notifications once, even with multiple tabs open 2024-03-19 14:55:51 +01:00
config debounces notifications with a key 2024-03-19 09:22:43 +01:00
controllers prevents users with permission to reach create form 2024-03-19 12:42:07 +01:00
helpers allows to directly create direct or global notifications 2024-03-19 12:39:58 +01:00
http adds preferences 2020-06-05 20:58:03 +02:00
lang allows to directly create direct or global notifications 2024-03-19 12:39:58 +01:00
models catches errors cause during que run 2025-09-30 09:41:54 +02:00
partials adds browser push notifications 2020-05-07 15:30:50 +02:00
updates allows to directly create direct or global notifications 2024-03-19 12:39:58 +01:00
workflows fixes translation 2023-10-20 09:50:37 +02:00
composer.json updates package description 2022-03-09 14:22:36 +00:00
Plugin.php allows to directly create direct or global notifications 2024-03-19 12:39:58 +01:00
README.md debounces notifications with a key 2024-03-19 09:22:43 +01:00
routes.php adds preferences 2020-06-05 20:58:03 +02:00

WinterCMS Backend Notifications Plugin

This plugin provides an API and UI for sending notifications to backend users.

Usage

The plugin provides a new entry in the backend navigation that shows the number of notifications the user has and on the page it lists all notifications. If allowed by the user, it will make use of browser push-notifications. The plugin will poll for new notifications every 5 seconds.

Notifications can be created programatically by firing an event:

Event::fire('studiobosco.backendnotifications.notify', [$user, $subject, $body, $url, $key]);
  • $user can be a user ID or a backend user object
  • $subject is mandatory and a string representing the notification subject
  • $body is optional and a string representing the html formatted body text of the notification
  • $url is optional and a string represting the URL to which the notification should link to.
  • $key is optional and if set, notifications with the same key will be debounced

Configuration

You can set the debounce time by creating a config file under config/studiobosco/backendnotifications.php with the following content:

<?php return [
    'debounceTime' => 30 // Debounce time in seconds
];