DumpPanel
API reference › Yii3 Debug › Panel › DumpPanel
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.
Methods
Section titled “Methods”| Method | Description | Defined 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 |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct(PHPForge\Debug\Helper\Trace $trace)Creates the Dump panel with its configured call-site renderer.
Parameters
| Parameter | Type | Description |
|---|---|---|
$trace | Trace | Configured renderer of the call-site frames shown in the dump cards. |
hasContent()
Section titled “hasContent() ”public function hasContent(array<string, mixed> $payload): boolReports 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
| 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 Yii2 Dump 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 counting the dumped variables, as the Yii2 Dump chip does.
Parameters
| Parameter | Type | Description |
|---|---|---|
$payload | array<string, | Serialized panel payload. |
Returns
list<PHPForge\Debug\Toolbar\ToolbarItem>: The count metric, or an empty list when nothing was dumped.