Skip to content
PHP Ecosystem
Explore

StandaloneActionResolver

API reference › Debug › service › StandaloneActionResolver

classyii\debug\service\StandaloneActionResolver
Sourcesrc/service/StandaloneActionResolver.php

Merges the standalone actions the debugger exposes and resolves a route against the resulting map.

PropertyTypeDescriptionDefined by
$module protected readonly constructoryii\debug\ModuleDebug module read for the action map and the default route at call time.StandaloneActionResolver
MethodDescriptionDefined by
__construct()Binds standalone action mapping and resolution to the debug module.StandaloneActionResolver
map()Merges the built-in and panel-declared standalone actions with the configured ones.StandaloneActionResolver
resolve()Resolves a route against the module action map and binds the action it names.StandaloneActionResolver
public function __construct(yii\debug\Module $module)

Binds standalone action mapping and resolution to the debug module.

Parameters

ParameterTypeDescription
$moduleyii\debug\ModuleDebug module read for the action map and the default route at call time.
public function map(array<string, class-string> $core, array<string, yii\debug\Panel> $panels, array<string, array<string, mixed>|class-string> $configured): array<string, array<string, mixed>|class-string>

Merges the built-in and panel-declared standalone actions with the configured ones.

Precedence, lowest to highest: the built-in actions, the actions registered panels declare through Panel::$actions, and the entries the application configured directly.

Parameters

ParameterTypeDescription
$corearray<string, class-string>Built-in actions indexed by action ID.
$panelsarray<string, yii\debug\Panel>Registered panels contributing their own actions.
$configuredarray<string, array<string, mixed>|class-string>Actions configured by the application.

Returns

array<string, array<string, mixed>|class-string>: Merged action map indexed by action ID.

public function resolve(string $route): yii\base\Action|null

Resolves a route against the module action map and binds the action it names.

An empty route falls back to Module::$defaultRoute; surrounding slashes are ignored, and a route naming more than one segment is left to convention-based discovery.

Parameters

ParameterTypeDescription
$routestringAction route relative to the module.

Returns

yii\base\Action|null: Action bound to the module, or null when the route names no mapped action.

Throws