# SidebarNavItem

> Typed view-model for one entry in the debugger sidebar panel navigation.

[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) › SidebarNavItem

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

Typed view-model for one entry in the debugger sidebar panel navigation.

## Properties

| Property | Type | Description | Defined by |
| --- | --- | --- | --- |
| <span id="property-iconSvg"></span>`$iconSvg` readonly constructor | `string` | Pre-rendered SVG glyph for the link icon; empty string when the panel did not supply a toolbar icon. | `SidebarNavItem` |
| <span id="property-isActive"></span>`$isActive` readonly constructor | `bool` | `true` when this entry represents the currently active route drives the `is-active` modifier and the `aria-current="page"` attribute on the rendered `<a>`. | `SidebarNavItem` |
| <span id="property-label"></span>`$label` readonly constructor | `string` | Visible label shown next to the icon ('History', 'Request', 'Database', ...). | `SidebarNavItem` |
| <span id="property-tooltip"></span>`$tooltip` readonly constructor | `string` | `title` / `aria-label` hover text. | `SidebarNavItem` |
| <span id="property-url"></span>`$url` readonly constructor | `string` | Pre-built link target for the `href` attribute. | `SidebarNavItem` |

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`__construct()`](#method-__construct) | Creates a debugger sidebar navigation entry. | `SidebarNavItem` |

## Method details

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

```php
public function __construct(string $label, string $iconSvg, string $url, string $tooltip, bool $isActive)
```

Creates a debugger sidebar navigation entry.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$label` | `string` |  |
| `$iconSvg` | `string` |  |
| `$url` | `string` |  |
| `$tooltip` | `string` |  |
| `$isActive` | `bool` |  |