Winter CMS plugin that allows to display notifications in the backend.
- PHP 64.8%
- HTML 22.9%
- JavaScript 11.7%
- CSS 0.6%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| assets | ||
| config | ||
| controllers | ||
| helpers | ||
| http | ||
| lang | ||
| models | ||
| partials | ||
| updates | ||
| workflows | ||
| composer.json | ||
| Plugin.php | ||
| README.md | ||
| routes.php | ||
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]);
$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
];