7 events in this category
Callback parameters: array location data.
This event receives the following data when emitted:
Emitted from:
backend/app/Controllers/Admin/LocationsController.phpuse App\Plugins\PluginEvents;
use App\Plugins\Events\Events\LocationsEvent;
public static function processEvents(PluginEvents $evt): void
{
$evt->on(LocationsEvent::onLocationCreated(), function ($createdBy, $location) {
// Handle stormnodes:admin:locations:location:created
// Data keys: created_by, location
});
}Callback parameters: int location id, array location data.
This event receives the following data when emitted:
Emitted from:
backend/app/Controllers/Admin/LocationsController.phpuse App\Plugins\PluginEvents;
use App\Plugins\Events\Events\LocationsEvent;
public static function processEvents(PluginEvents $evt): void
{
$evt->on(LocationsEvent::onLocationDeleted(), function ($deletedBy, $location) {
// Handle stormnodes:admin:locations:location:deleted
// Data keys: deleted_by, location
});
}Callback parameters: int location id, string error message.
use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\LocationsEvent;
public static function processEvents(PluginEvents $evt): void
{
$evt->on(LocationsEvent::onLocationNotFound(), function ($id, $message) {
// Handle stormnodes:admin:locations:location:not:found
// Parameters: int location id, string error message.
});
}Callback parameters: int location id, array location data.
use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\LocationsEvent;
public static function processEvents(PluginEvents $evt): void
{
$evt->on(LocationsEvent::onLocationRetrieved(), function ($id, $data) {
// Handle stormnodes:admin:locations:location:retrieved
// Parameters: int location id, array location data.
});
}Callback parameters: string error message, array context.
use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\LocationsEvent;
public static function processEvents(PluginEvents $evt): void
{
$evt->on(LocationsEvent::onLocationsError(), function ($message, $context) {
// Handle stormnodes:admin:locations:error
// Parameters: string error message, array context.
});
}Callback parameters: array locations list.
use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\LocationsEvent;
public static function processEvents(PluginEvents $evt): void
{
$evt->on(LocationsEvent::onLocationsRetrieved(), function ($list) {
// Handle stormnodes:admin:locations:retrieved
// Parameters: array locations list.
});
}Callback parameters: int location id, array old data, array new data.
This event receives the following data when emitted:
Emitted from:
backend/app/Controllers/Admin/LocationsController.phpuse App\Plugins\PluginEvents;
use App\Plugins\Events\Events\LocationsEvent;
public static function processEvents(PluginEvents $evt): void
{
$evt->on(LocationsEvent::onLocationUpdated(), function ($location, $updatedBy, $updatedData) {
// Handle stormnodes:admin:locations:location:updated
// Data keys: location, updated_by, updated_data
});
}