8 events in this category
Callback parameters: array notification data.
This event receives the following data when emitted:
Emitted from:
backend/app/Controllers/Admin/NotificationsController.phpuse App\Plugins\PluginEvents;
use App\Plugins\Events\Events\NotificationsEvent;
public static function processEvents(PluginEvents $evt): void
{
$evt->on(NotificationsEvent::onNotificationCreated(), function ($createdBy, $notificationData, $notificationId) {
// Handle stormnodes:admin:notifications:notification:created
// Data keys: created_by, notification_data, notification_id
});
}Callback parameters: int notification id, array notification data.
This event receives the following data when emitted:
Emitted from:
backend/app/Controllers/Admin/NotificationsController.phpuse App\Plugins\PluginEvents;
use App\Plugins\Events\Events\NotificationsEvent;
public static function processEvents(PluginEvents $evt): void
{
$evt->on(NotificationsEvent::onNotificationDeleted(), function ($deletedBy, $notificationData, $notificationId) {
// Handle stormnodes:admin:notifications:notification:deleted
// Data keys: deleted_by, notification_data, notification_id
});
}Callback parameters: int notification id, int user id.
This event receives the following data when emitted:
Emitted from:
backend/app/Controllers/User/NotificationController.phpuse App\Plugins\PluginEvents;
use App\Plugins\Events\Events\NotificationsEvent;
public static function processEvents(PluginEvents $evt): void
{
$evt->on(NotificationsEvent::onNotificationDismissed(), function ($notificationId, $user, $userId) {
// Handle stormnodes:user:notifications:notification:dismissed
// Data keys: notification_id, user, user_id
});
}Callback parameters: int notification id, string error message.
This event receives the following data when emitted:
Emitted from:
backend/app/Controllers/Admin/NotificationsController.phpuse App\Plugins\PluginEvents;
use App\Plugins\Events\Events\NotificationsEvent;
public static function processEvents(PluginEvents $evt): void
{
$evt->on(NotificationsEvent::onNotificationNotFound(), function ($errorMessage, $notificationId) {
// Handle stormnodes:admin:notifications:notification:not:found
// Data keys: error_message, notification_id
});
}Callback parameters: int notification id, array notification data.
This event receives the following data when emitted:
Emitted from:
backend/app/Controllers/Admin/NotificationsController.phpuse App\Plugins\PluginEvents;
use App\Plugins\Events\Events\NotificationsEvent;
public static function processEvents(PluginEvents $evt): void
{
$evt->on(NotificationsEvent::onNotificationRetrieved(), function ($notificationData, $notificationId) {
// Handle stormnodes:admin:notifications:notification:retrieved
// Data keys: notification_data, notification_id
});
}Callback parameters: string error message, array context.
use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\NotificationsEvent;
public static function processEvents(PluginEvents $evt): void
{
$evt->on(NotificationsEvent::onNotificationsError(), function ($message, $context) {
// Handle stormnodes:admin:notifications:error
// Parameters: string error message, array context.
});
}Callback parameters: array notifications list.
This event receives the following data when emitted:
Emitted from:
backend/app/Controllers/Admin/NotificationsController.phpuse App\Plugins\PluginEvents;
use App\Plugins\Events\Events\NotificationsEvent;
public static function processEvents(PluginEvents $evt): void
{
$evt->on(NotificationsEvent::onNotificationsRetrieved(), function ($filters, $limit, $notifications, $page, $pagination, $search, $total, $type) {
// Handle stormnodes:admin:notifications:retrieved
// Data keys: filters, limit, notifications, page, pagination, search, total, type
});
}Callback parameters: int notification id, array old data, array new data.
This event receives the following data when emitted:
Emitted from:
backend/app/Controllers/Admin/NotificationsController.phpuse App\Plugins\PluginEvents;
use App\Plugins\Events\Events\NotificationsEvent;
public static function processEvents(PluginEvents $evt): void
{
$evt->on(NotificationsEvent::onNotificationUpdated(), function ($newData, $notificationId, $oldData, $updatedBy) {
// Handle stormnodes:admin:notifications:notification:updated
// Data keys: new_data, notification_id, old_data, updated_by
});
}