7 events in this category
Callback parameters: array allocation data.
This event receives the following data when emitted:
Emitted from:
backend/app/Controllers/Admin/AllocationsController.phpuse App\Plugins\PluginEvents;
use App\Plugins\Events\Events\AllocationsEvent;
public static function processEvents(PluginEvents $evt): void
{
$evt->on(AllocationsEvent::onAllocationCreated(), function ($allocations, $createdBy, $createdCount) {
// Handle stormnodes:admin:allocations:allocation:created
// Data keys: allocations, created_by, created_count
});
}Callback parameters: int allocation id, array allocation data.
This event receives the following data when emitted:
Emitted from:
backend/app/Controllers/Admin/AllocationsController.phpuse App\Plugins\PluginEvents;
use App\Plugins\Events\Events\AllocationsEvent;
public static function processEvents(PluginEvents $evt): void
{
$evt->on(AllocationsEvent::onAllocationDeleted(), function ($allocation, $deletedBy, $deletedCount, $ids, $ip, $nodeId, $skippedCount) {
// Handle stormnodes:admin:allocations:allocation:deleted
// Data keys: allocation, deleted_by, deleted_count, ids, ip, node_id, skipped_count
});
}Callback parameters: int allocation id, string error message.
use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\AllocationsEvent;
public static function processEvents(PluginEvents $evt): void
{
$evt->on(AllocationsEvent::onAllocationNotFound(), function ($id, $message) {
// Handle stormnodes:admin:allocations:allocation:not:found
// Parameters: int allocation id, string error message.
});
}Callback parameters: int allocation id, array allocation data.
use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\AllocationsEvent;
public static function processEvents(PluginEvents $evt): void
{
$evt->on(AllocationsEvent::onAllocationRetrieved(), function ($id, $data) {
// Handle stormnodes:admin:allocations:allocation:retrieved
// Parameters: int allocation id, array allocation data.
});
}Callback parameters: string error message, array context.
use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\AllocationsEvent;
public static function processEvents(PluginEvents $evt): void
{
$evt->on(AllocationsEvent::onAllocationsError(), function ($message, $context) {
// Handle stormnodes:admin:allocations:error
// Parameters: string error message, array context.
});
}Callback parameters: array allocations list.
use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\AllocationsEvent;
public static function processEvents(PluginEvents $evt): void
{
$evt->on(AllocationsEvent::onAllocationsRetrieved(), function ($list) {
// Handle stormnodes:admin:allocations:retrieved
// Parameters: array allocations list.
});
}Callback parameters: int allocation id, array old data, array new data.
This event receives the following data when emitted:
Emitted from:
backend/app/Controllers/Admin/AllocationsController.phpuse App\Plugins\PluginEvents;
use App\Plugins\Events\Events\AllocationsEvent;
public static function processEvents(PluginEvents $evt): void
{
$evt->on(AllocationsEvent::onAllocationUpdated(), function ($allocation, $updatedBy, $updatedData) {
// Handle stormnodes:admin:allocations:allocation:updated
// Data keys: allocation, updated_by, updated_data
});
}