UserPanel
API reference › Yii3 Debug › Panel › UserPanel
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.
Methods
Section titled “Methods”| Method | Description | Defined 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 |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct()Binds the adapter to the shared User presentation.
toolbarItems()
Section titled “toolbarItems() ”public function toolbarItems(array<string, mixed> $payload): list<PHPForge\Debug\Toolbar\ToolbarItem>Names the signed-in user by ID, or reports a guest.
Parameters
| Parameter | Type | Description |
|---|---|---|
$payload | array<string, | 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.