Console

3 events in this category

stormnodes:admin:console:command:executed

Callback parameters: string command, array execution data.

onCommandExecuted

Event Data Structure

This event receives the following data when emitted:

command
executed_by
execution_time
return_code
working_directory

Emitted from:

backend/app/Controllers/Admin/ConsoleController.php

Usage Example

use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\ConsoleEvent;

public static function processEvents(PluginEvents $evt): void
{
    $evt->on(ConsoleEvent::onCommandExecuted(), function ($command, $executedBy, $executionTime, $returnCode, $workingDirectory) {
        // Handle stormnodes:admin:console:command:executed
        // Data keys: command, executed_by, execution_time, return_code, working_directory
    });
}

stormnodes:admin:console:error

Callback parameters: string error message, array context.

onConsoleError

Usage Example

use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\ConsoleEvent;

public static function processEvents(PluginEvents $evt): void
{
    $evt->on(ConsoleEvent::onConsoleError(), function ($message, $context) {
        // Handle stormnodes:admin:console:error
        // Parameters: string error message, array context.
    });
}

stormnodes:admin:console:system_info:retrieved

Callback parameters: array system info.

onSystemInfoRetrieved

Usage Example

use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\ConsoleEvent;

public static function processEvents(PluginEvents $evt): void
{
    $evt->on(ConsoleEvent::onSystemInfoRetrieved(), function ($info) {
        // Handle stormnodes:admin:console:system_info:retrieved
        // Parameters: array system info.
    });
}