EventPanel
API reference › Yii3 Debug › Panel › EventPanel
Presents dispatched PSR-14 events and contributes their total to the debug toolbar.
Methods
Section titled “Methods”| Method | Description | Defined 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 |
Method details
Section titled “Method details”hasContent()
Section titled “hasContent() ”public function hasContent(array<string, mixed> $payload): boolReports 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
| Parameter | Type | Description |
|---|---|---|
$payload | array<string, | Serialized panel payload. |
Returns
bool: true when the capture carried data; false otherwise.
icon()
Section titled “icon() ”public function icon(): stringReturns the icon key shared with the built-in Events navigation entry.
Returns
string: Shared Debug Core icon key.
public function id(): stringReturns the identifier associating the panel with its slice of the captured payload.
Returns
string: Stable panel identifier.
name()
Section titled “name() ”public function name(): stringReturns the panel title shown in the debugger navigation.
Returns
string: Human-readable panel name.
render()
Section titled “render() ”public function render(Yii3\Debug\Panel\PanelRenderInput $input): stringRenders the detail view, letting the page context drive filtering, sorting, and paging.
Parameters
| Parameter | Type | Description |
|---|---|---|
$input | PanelRenderInput | Payload, request context, and request summary of the page being rendered. |
Returns
string: Rendered panel markup.
toolbarItems()
Section titled “toolbarItems() ”public function toolbarItems(array<string, mixed> $payload): list<PHPForge\Debug\Toolbar\ToolbarItem>Builds the toolbar metric: the number of events the request dispatched.
Parameters
| Parameter | Type | Description |
|---|---|---|
$payload | array<string, | Serialized panel payload. |
Returns
list<PHPForge\Debug\Toolbar\ToolbarItem>: Toolbar metrics, or an empty list when the capture dispatched no event.