Skip to content
PHP Ecosystem
Explore

SidebarDataNormalizer

API reference › Debug › widgets › sidebar › SidebarDataNormalizer

final classyii\debug\widgets\sidebar\SidebarDataNormalizer
Sourcesrc/widgets/sidebar/SidebarDataNormalizer.php

Builds the Debug Core sidebar view-model used by history and request views, with every route already resolved through Url::to().

  • fromView(...) used by panel view requests; surfaces the active request snapshot and highlights the active panel in the nav.
  • fromIndex(...)used by index requests; surfaces the newest captured request and highlights the History entry.
  • fromStandalone(...) used by pages outside any capture, such as phpinfo; highlights nothing.
MethodDescriptionDefined by
fromIndex() staticBuilds 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() staticBuilds the sidebar view-model for a standalone debugger page such as phpinfo.SidebarDataNormalizer
fromView() staticBuilds the sidebar view-model for panel view requests. Surfaces the active request snapshot and highlights the active panel in the nav.SidebarDataNormalizer
public static function fromIndex(array<string, yii\debug\Panel> $panels, array<string, PHPForge\Debug\Storage\RequestSummary> $manifest, string $cursorInit = ''): PHPForge\Debug\View\Sidebar\SidebarView

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.

Parameters

ParameterTypeDescription
$panelsarray<string, yii\debug\Panel>Registered panels keyed by ID.
$manifestarray<string, PHPForge\Debug\Storage\RequestSummary>Captured request summaries, newest first.
$cursorInitstringTag 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.

public static function fromStandalone(array<string, yii\debug\Panel> $panels, array<string, PHPForge\Debug\Storage\RequestSummary> $manifest): PHPForge\Debug\View\Sidebar\SidebarView

Builds 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

ParameterTypeDescription
$panelsarray<string, yii\debug\Panel>Registered panels keyed by ID.
$manifestarray<string, PHPForge\Debug\Storage\RequestSummary>Captured request summaries, newest first.

Returns

PHPForge\Debug\View\Sidebar\SidebarView: Sidebar view-model for the standalone page.

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\SidebarView

Builds the sidebar view-model for panel view requests. Surfaces the active request snapshot and highlights the active panel in the nav.

Parameters

ParameterTypeDescription
$panelsarray<string, yii\debug\Panel>Registered panels keyed by ID.
$manifestarray<string, PHPForge\Debug\Storage\RequestSummary>Captured request summaries, newest first.
$activePanelyii\debug\PanelPanel being inspected, highlighted in the navigation.
$tagstringTag of the capture under inspection.
$summaryPHPForge\Debug\Storage\RequestSummarySummary of the capture under inspection.

Returns

PHPForge\Debug\View\Sidebar\SidebarView: Sidebar view-model for the panel view.