# SidebarView

> Top-level typed view-model for the debugger sidebar partial.

[API reference](/docs/api/index.md) › [Debug Core](/docs/extensions/debug-core/reference/index.md) › [View](/docs/extensions/debug-core/reference/view/index.md) › [Sidebar](/docs/extensions/debug-core/reference/view/sidebar/index.md) › SidebarView

| final readonly class | `PHPForge\Debug\View\Sidebar\SidebarView` |
| --- | --- |
| Source | [`src/View/Sidebar/SidebarView.php`](https://github.com/php-forge/debug-core/blob/main/src/View/Sidebar/SidebarView.php#L15) |

Top-level typed view-model for the debugger sidebar partial.

## Properties

| Property | Type | Description | Defined by |
| --- | --- | --- | --- |
| <span id="property-navGroups"></span>`$navGroups` readonly constructor | `array<string, list<`[`SidebarNavItem`](/docs/extensions/debug-core/reference/view/sidebar/sidebarnavitem/index.md)`>>` | Additional labeled navigation groups rendered after [`$navItems`](/docs/extensions/debug-core/reference/view/sidebar/sidebarview/index.md#property-navItems). Default: `[]`. | `SidebarView` |
| <span id="property-navItems"></span>`$navItems` readonly constructor | `list<`[`SidebarNavItem`](/docs/extensions/debug-core/reference/view/sidebar/sidebarnavitem/index.md)`>` | Panel navigation entries in display order (History first, then panels except config). | `SidebarView` |
| <span id="property-snapshot"></span>`$snapshot` readonly constructor | [`SidebarSnapshot`](/docs/extensions/debug-core/reference/view/sidebar/sidebarsnapshot/index.md)`\|null` | Snapshot card view-model; `null` when the manifest is empty so the card section is skipped entirely. | `SidebarView` |

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`__construct()`](#method-__construct) | Creates the debugger sidebar view. | `SidebarView` |

## Method details

### __construct() <span id="method-__construct"></span>

```php
public function __construct(PHPForge\Debug\View\Sidebar\SidebarSnapshot|null $snapshot, array $navItems, array $navGroups = [])
```

Creates the debugger sidebar view.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$snapshot` | [`SidebarSnapshot`](/docs/extensions/debug-core/reference/view/sidebar/sidebarsnapshot/index.md)`\|null` |  |
| `$navItems` | `array` |  |
| `$navGroups` | `array` |  |