studiobosco / wn-backendnotifications-plugin
WinterCMS Backend notifications plugin
Installs: 38
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Forks: 4
Type:winter-plugin
pkg:composer/studiobosco/wn-backendnotifications-plugin
Requires
- composer/installers: ~1.0
This package is not auto-updated.
Last update: 2025-10-28 08:01:21 UTC
README
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]);
$usercan be a user ID or a backend user object$subjectis mandatory and a string representing the notification subject$bodyis optional and a string representing the html formatted body text of the notification$urlis optional and a string represting the URL to which the notification should link to.$keyis 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
];