Skip to content
PHP Ecosystem
Explore

DumpPanel

API reference › Yii3 Debug › Panel › DumpPanel

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

Presents the values dumped during the request as the Yii2 Dump grid and contributes the dump count to the toolbar.

The grid chrome is host-rendered like the Logs grid, while every dump card comes from DumpCardRenderer, so a capture written by either host renders the same cells. Filters reuse the Log[...] group of LogSearch, as the Yii2 Dump grid does.

MethodDescriptionDefined by
__construct()Creates the Dump panel with its configured call-site renderer.DumpPanel
hasContent()Reports whether the capture recorded a Dump payload worth opening the panel for.DumpPanel
icon()Returns the icon key shared with the Yii2 Dump navigation entry.DumpPanel
id()Returns the identifier associating the panel with its slice of the captured payload.DumpPanel
name()Returns the panel title shown in the debugger navigation.DumpPanel
render()Renders the detail view, letting the page context drive filtering, sorting, and paging.DumpPanel
toolbarItems()Builds the toolbar metric counting the dumped variables, as the Yii2 Dump chip does.DumpPanel
public function __construct(PHPForge\Debug\Helper\Trace $trace)

Creates the Dump panel with its configured call-site renderer.

Parameters

ParameterTypeDescription
$traceTraceConfigured renderer of the call-site frames shown in the dump cards.
public function hasContent(array<string, mixed> $payload): bool

Reports whether the capture recorded a Dump payload worth opening the panel for.

The capture is listed whenever it carries a payload, as in Yii2, so a request without dumps shows the empty state.

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 Yii2 Dump 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 counting the dumped variables, as the Yii2 Dump chip does.

Parameters

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

Returns

list<PHPForge\Debug\Toolbar\ToolbarItem>: The count metric, or an empty list when nothing was dumped.