CaptureToolbarProviderInterface
API reference › Yii3 Debug › Panel › CaptureToolbarProviderInterface
Implemented by 1 type
Defines a toolbar panel whose metrics depend on which capture the toolbar describes, not only on its payload.
ToolbarDataFactory calls toolbarItemsForCapture() instead of
ToolbarPanelProviderInterface::toolbarItems(), so a panel can look the capture up in the history, for
example to point at the request that preceded a redirect.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
hasContent() abstract | Returns whether a captured payload contains activity worth exposing in the sidebar. | ExtensionPanelInterface |
icon() abstract | Returns the shared Debug Core icon key. | ExtensionPanelInterface |
id() abstract | Returns the stable panel identifier used in captured payloads and debug URLs. | ExtensionPanelInterface |
name() abstract | Returns the human-readable panel name. | ExtensionPanelInterface |
render() abstract | Renders the detail content for a captured payload. | ExtensionPanelInterface |
toolbarItems() abstract | Returns the toolbar metrics for a captured payload. | ToolbarPanelProviderInterface |
toolbarItemsForCapture() abstract | Returns the toolbar metrics for a captured payload of a known capture. | CaptureToolbarProviderInterface |
Method details
Section titled “Method details”toolbarItemsForCapture()
Section titled “toolbarItemsForCapture() ”abstract public function toolbarItemsForCapture(string $tag, array<string, mixed> $payload): list<PHPForge\Debug\Toolbar\ToolbarItem>Returns the toolbar metrics for a captured payload of a known capture.
Parameters
| Parameter | Type | Description |
|---|---|---|
$tag | string | Tag of the capture the toolbar describes. |
$payload | array<string, | Serialized panel payload of that capture. |
Returns
list<PHPForge\Debug\Toolbar\ToolbarItem>: Toolbar metrics, or an empty list when the panel should stay hidden.