Skip to content
PHP Ecosystem
Explore

CaptureToolbarProviderInterface

API reference › Yii3 Debug › Panel › CaptureToolbarProviderInterface

interfaceYii3\Debug\Panel\CaptureToolbarProviderInterface
ExtendsToolbarPanelProviderInterface
Sourcesrc/Panel/CaptureToolbarProviderInterface.php
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.

MethodDescriptionDefined by
hasContent() abstractReturns whether a captured payload contains activity worth exposing in the sidebar.ExtensionPanelInterface
icon() abstractReturns the shared Debug Core icon key.ExtensionPanelInterface
id() abstractReturns the stable panel identifier used in captured payloads and debug URLs.ExtensionPanelInterface
name() abstractReturns the human-readable panel name.ExtensionPanelInterface
render() abstractRenders the detail content for a captured payload.ExtensionPanelInterface
toolbarItems() abstractReturns the toolbar metrics for a captured payload.ToolbarPanelProviderInterface
toolbarItemsForCapture() abstractReturns the toolbar metrics for a captured payload of a known capture.CaptureToolbarProviderInterface
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

ParameterTypeDescription
$tagstringTag of the capture the toolbar describes.
$payloadarray<string, mixed>Serialized panel payload of that capture.

Returns

list<PHPForge\Debug\Toolbar\ToolbarItem>: Toolbar metrics, or an empty list when the panel should stay hidden.