Skip to content
PHP Ecosystem
Explore

UserPanel

API reference › Yii3 Debug › Panel › UserPanel

final classYii3\Debug\Panel\UserPanel
ExtendsProviderPanel
ImplementsToolbarPanelProviderInterface
Sourcesrc/Panel/UserPanel.php

Adapts the framework-neutral PHPForge User panel to the Yii3 debugger.

The detail view and the sidebar entry come from the shared presentation, which shows its empty state for a guest capture. The toolbar metric matches the Yii2 User panel instead of the shared username metric: it names the user ID, or reads Guest when nobody was signed in.

MethodDescriptionDefined by
__construct()Binds the adapter to the shared User presentation.UserPanel
hasContent()Returns whether the capture holds a presentation for this panel.ProviderPanel
icon()Returns the shared Debug Core icon key.ProviderPanel
id()Returns the stable identifier of this panel.ProviderPanel
name()Returns the human-readable panel name.ProviderPanel
render()Renders the detail content the provider produces for a capture.ProviderPanel
toolbarItems()Names the signed-in user by ID, or reports a guest.UserPanel
withMetadata()Returns a copy presenting the panel under the metadata the application configured.ProviderPanel
public function __construct()

Binds the adapter to the shared User presentation.

public function toolbarItems(array<string, mixed> $payload): list<PHPForge\Debug\Toolbar\ToolbarItem>

Names the signed-in user by ID, or reports a guest.

Parameters

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

Returns

list<PHPForge\Debug\Toolbar\ToolbarItem>: One info metric carrying the user ID, or a Guest metric when the capture holds no ID.

Throws

  • PHPForge\Debug\Storage\HydrationException: when the payload does not match the User snapshot schema.