Skip to content
PHP Ecosystem
Explore

ProviderPanel

API reference › Debug › panels › ProviderPanel

Adapts any provider-owned declarative panel to the Yii2 debugger; no framework-specific presenter is needed.

PropertyTypeDescriptionDefined by
$actionsarray<string, array<string, mixed>|class-string>Standalone actions merged into the debug module’s Module::$actionMap, keyed by action ID. Default: [].yii\debug\Panel
$behaviors read-onlyarray<yii\base\Behavior<static>>List of behaviors attached to this component.yii\base\Component
$detail read-onlystringRendered detail view.ProviderPanel
$iconstring|nullIcon key resolved for this registration, or null to render the provider default. Default: null.ProviderPanel
$idstringPanel unique identifier, assigned by the container module on registration. Default: ''.yii\debug\Panel
$moduleyii\debug\Module|nullDebug module owning this panel. Default: null.yii\debug\Panel
$name read-onlystringConfigured display title, or the one declared by the provider.ProviderPanel
$providerPHPForge\Debug\Panel|nullDeclarative panel supplying the identity, capture format, and presentation of this registration. Default: null.ProviderPanel
$renderContextPHPForge\Debug\Panel\PanelRenderContext|nullPrepared render context, or null outside a debugger request.yii\debug\Panel
$tagstringTag of the request whose data this panel currently exposes. Default: ''.yii\debug\Panel
$titlestring|nullDisplay title resolved for this registration, or null to render the provider default. Default: null.ProviderPanel
$toolbarData read-onlyarray<string, mixed>Toolbar envelope; [] to skip the panel.yii\debug\Panel
$toolbarIcon read-onlystringConfigured toolbar icon key, or the one declared by the provider.ProviderPanel
$url read-onlystringAbsolute URL to the panel detail view.yii\debug\Panel
$viewPath read-onlystringDirectory the panel views resolve against.yii\debug\Panel
$error protectedPHPForge\Debug\Storage\ExceptionSnapshot|nullException captured when the panel failed to produce or hydrate its snapshot. Default: null.yii\debug\Panel
MethodDescriptionDefined by
__construct()Constructor.yii\base\BaseObject
__call()Calls the named method which is not a class method.yii\base\Component
__clone()This method is called after the object is created by cloning an existing one.yii\base\Component
__get()Returns the value of a component property.yii\base\Component
__isset()Checks if a property is set, i.e. defined and not null.yii\base\Component
__set()Sets the value of a component property.yii\base\Component
__unset()Sets a component property to be null.yii\base\Component
attachBehavior()Attaches a behavior to this component.yii\base\Component
attachBehaviors()Attaches a list of behaviors to the component.yii\base\Component
behaviors()Returns a list of behaviors that this component should behave as.yii\base\Component
canGetProperty()Returns a value indicating whether a property can be read.yii\base\Component
canSetProperty()Returns a value indicating whether a property can be set.yii\base\Component
capture()Captures the panel payload for the current request.yii\debug\Panel
className() staticReturns the fully qualified name of this class.yii\base\BaseObject
detachBehavior()Detaches a behavior from the component.yii\base\Component
detachBehaviors()Detaches all behaviors from the component.yii\base\Component
ensureBehaviors()Makes sure that the behaviors declared in behaviors() are attached to this component.yii\base\Component
getBehavior()Returns the named behavior object.yii\base\Component
getBehaviors()Returns all behaviors attached to this component.yii\base\Component
getDetail()Renders the provider’s presentation of the hydrated capture.ProviderPanel
getError()Returns the exception captured while collecting the panel payload, if any.yii\debug\Panel
getName()Returns the human-readable panel name, preferring the title resolved by the registration policy.ProviderPanel
getRenderContext()Returns the framework-neutral render context for the active debugger request, when one has been prepared.yii\debug\Panel
getToolbarData()Returns the toolbar envelope wrapping the panel’s icon, items, and URL.yii\debug\Panel
getToolbarIcon()Returns the shared Debug Core icon key, preferring the one resolved by the registration policy.ProviderPanel
getTraceLine()Builds a trace line for the toolbar through the shared Trace renderer, applying Module::$tracePathMappings and the configured Module::$traceLine template (or callable).yii\debug\Panel
getUrl()Returns the URL pointing to this panel’s detail view for the current request tag.yii\debug\Panel
getViewPath()Returns the directory under which the panel’s relative views resolve.yii\debug\Panel
hasContent()Returns whether the capture holds a presentation for this panel.ProviderPanel
hasError()Returns true when setError() captured an exception during panel capture or hydration.yii\debug\Panel
hasEventHandlers()Returns a value indicating whether there is any handler attached to the named event.yii\base\Component
hasMethod()Returns a value indicating whether a method is defined.yii\base\Component
hasProperty()Returns a value indicating whether a property is defined for this component.yii\base\Component
hydrate()Clears any previous error and rebuilds the presentation from the captured payload.ProviderPanel
init()Initializes the object.yii\base\BaseObject
isEnabled()Indicates whether this panel is enabled and should be registered by the module.yii\debug\Panel
isVisible()Returns whether the panel should appear in the toolbar and sidebar navigation.yii\debug\Panel
moduleBound()Validates the configured provider as soon as the panel is bound to the module, so misconfiguration surfaces at bootstrap instead of at render time.ProviderPanel
off()Detaches an existing event handler from this component.yii\base\Component
on()Attaches an event handler to an event.yii\base\Component
setError()Records an exception thrown during capture or hydration so LogTarget can surface it in the UI.yii\debug\Panel
setRenderContext()Installs the framework-neutral render context prepared for this panel by the debugger action.yii\debug\Panel
trigger()Triggers an event.yii\base\Component
getToolbarItems() protectedBuilds the toolbar metrics the provider declares for a capture.ProviderPanel
public function getDetail(): string

Renders the provider’s presentation of the hydrated capture.

Returns

string: Rendered detail view.

Throws

public function getName(): string

Returns the human-readable panel name, preferring the title resolved by the registration policy.

Returns

string: Configured display title, or the one declared by the provider.

Throws

public function getToolbarIcon(): string

Returns the shared Debug Core icon key, preferring the one resolved by the registration policy.

Returns

string: Configured toolbar icon key, or the one declared by the provider.

Throws

public function hasContent(): bool

Returns whether the capture holds a presentation for this panel.

An extension the application enabled stays listed even on a capture where it recorded no activity, so its own empty state explains the idle capture instead of the entry disappearing from the sidebar.

Returns

bool: true when the panel carries an error or a presentation built from the capture; false otherwise.

public function hydrate(array<string, mixed> $payload): void

Clears any previous error and rebuilds the presentation from the captured payload.

Parameters

ParameterTypeDescription
$payloadarray<string, mixed>Captured panel payload.

Throws

public function moduleBound(): void

Validates the configured provider as soon as the panel is bound to the module, so misconfiguration surfaces at bootstrap instead of at render time.

Throws

protected function getToolbarItems(): array<int, array<string, mixed>>

Builds the toolbar metrics the provider declares for a capture.

Returns

array<int, array<string, mixed>>: Toolbar chips built from the provider’s metrics, in declared order.