Skip to content
PHP Ecosystem
Explore

EventPanel

API reference › Yii3 Debug › Panel › EventPanel

final readonly classYii3\Debug\Panel\EventPanel
ImplementsToolbarPanelProviderInterface
Sourcesrc/Panel/EventPanel.php

Presents dispatched PSR-14 events and contributes their total to the debug toolbar.

MethodDescriptionDefined by
hasContent()Reports whether the capture recorded dispatched events worth opening the panel for.EventPanel
icon()Returns the icon key shared with the built-in Events navigation entry.EventPanel
id()Returns the identifier associating the panel with its slice of the captured payload.EventPanel
name()Returns the panel title shown in the debugger navigation.EventPanel
render()Renders the detail view, letting the page context drive filtering, sorting, and paging.EventPanel
toolbarItems()Builds the toolbar metric: the number of events the request dispatched.EventPanel
public function hasContent(array<string, mixed> $payload): bool

Reports whether the capture recorded dispatched events worth opening the panel for.

The capture is listed whenever it carries a payload; the detail page and the toolbar chip surface a malformed one when they hydrate it.

Parameters

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

Returns

bool: true when the capture carried data; false otherwise.

public function icon(): string

Returns the icon key shared with the built-in Events navigation entry.

Returns

string: Shared Debug Core icon key.

public function id(): string

Returns the identifier associating the panel with its slice of the captured payload.

Returns

string: Stable panel identifier.

public function name(): string

Returns the panel title shown in the debugger navigation.

Returns

string: Human-readable panel name.

public function render(Yii3\Debug\Panel\PanelRenderInput $input): string

Renders the detail view, letting the page context drive filtering, sorting, and paging.

Parameters

ParameterTypeDescription
$inputPanelRenderInputPayload, request context, and request summary of the page being rendered.

Returns

string: Rendered panel markup.

public function toolbarItems(array<string, mixed> $payload): list<PHPForge\Debug\Toolbar\ToolbarItem>

Builds the toolbar metric: the number of events the request dispatched.

Parameters

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

Returns

list<PHPForge\Debug\Toolbar\ToolbarItem>: Toolbar metrics, or an empty list when the capture dispatched no event.