SidebarDataNormalizer
API reference › Debug › widgets › sidebar › SidebarDataNormalizer
Builds the Debug Core sidebar view-model used by history and request views, with every route already resolved
through Url::to().
fromView(...)used by panelviewrequests; surfaces the active request snapshot and highlights the active panel in the nav.fromIndex(...)used byindexrequests; surfaces the newest captured request and highlights the History entry.fromStandalone(...)used by pages outside any capture, such as phpinfo; highlights nothing.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
fromIndex() static | Builds the sidebar view-model for index.php (history grid). Surfaces the newest captured request as the snapshot, marks the History entry as active, and wires the navigator buttons as a GridView cursor. | SidebarDataNormalizer |
fromStandalone() static | Builds the sidebar view-model for a standalone debugger page such as phpinfo. | SidebarDataNormalizer |
fromView() static | Builds the sidebar view-model for panel view requests. Surfaces the active request snapshot and highlights the active panel in the nav. | SidebarDataNormalizer |
Method details
Section titled “Method details”fromIndex()
Section titled “fromIndex() ”public static function fromIndex(array<string, yii\debug\Panel> $panels, array<string, PHPForge\Debug\Storage\RequestSummary> $manifest, string $cursorInit = ''): PHPForge\Debug\View\Sidebar\SidebarViewBuilds the sidebar view-model for index.php (history grid). Surfaces the newest captured request as the
snapshot, marks the History entry as active, and wires the navigator buttons as a GridView cursor.
Parameters
| Parameter | Type | Description |
|---|---|---|
$panels | array<string, yii\> | Registered panels keyed by ID. |
$manifest | array<string, | Captured request summaries, newest first. |
$cursorInit | string | Tag the cursor should land on; empty to start at the newest capture. |
Returns
PHPForge\Debug\View\Sidebar\SidebarView: Sidebar view-model for the history grid.
fromStandalone()
Section titled “fromStandalone() ”public static function fromStandalone(array<string, yii\debug\Panel> $panels, array<string, PHPForge\Debug\Storage\RequestSummary> $manifest): PHPForge\Debug\View\Sidebar\SidebarViewBuilds the sidebar view-model for a standalone debugger page such as phpinfo.
The page belongs to no capture and to no panel, so the navigation highlights nothing and the snapshot card surfaces the newest capture, keeping the reader one click from the panels.
Parameters
| Parameter | Type | Description |
|---|---|---|
$panels | array<string, yii\> | Registered panels keyed by ID. |
$manifest | array<string, | Captured request summaries, newest first. |
Returns
PHPForge\Debug\View\Sidebar\SidebarView: Sidebar view-model for the standalone page.
fromView()
Section titled “fromView() ”public static function fromView(array<string, yii\debug\Panel> $panels, array<string, PHPForge\Debug\Storage\RequestSummary> $manifest, yii\debug\Panel $activePanel, string $tag, PHPForge\Debug\Storage\RequestSummary $summary): PHPForge\Debug\View\Sidebar\SidebarViewBuilds the sidebar view-model for panel view requests. Surfaces the active request snapshot and highlights the
active panel in the nav.
Parameters
| Parameter | Type | Description |
|---|---|---|
$panels | array<string, yii\> | Registered panels keyed by ID. |
$manifest | array<string, | Captured request summaries, newest first. |
$activePanel | yii\ | Panel being inspected, highlighted in the navigation. |
$tag | string | Tag of the capture under inspection. |
$summary | PHPForge\ | Summary of the capture under inspection. |
Returns
PHPForge\Debug\View\Sidebar\SidebarView: Sidebar view-model for the panel view.