Skip to content
PHP Ecosystem
Explore

SidebarNavItem

API reference › Debug Core › View › Sidebar › SidebarNavItem

final readonly classPHPForge\Debug\View\Sidebar\SidebarNavItem
Sourcesrc/View/Sidebar/SidebarNavItem.php

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

PropertyTypeDescriptionDefined by
$iconSvg readonly constructorstringPre-rendered SVG glyph for the link icon; empty string when the panel did not supply a toolbar icon.SidebarNavItem
$isActive readonly constructorbooltrue when this entry represents the currently active route drives the is-active modifier and the aria-current="page" attribute on the rendered <a>.SidebarNavItem
$label readonly constructorstringVisible label shown next to the icon (‘History’, ‘Request’, ‘Database’, …).SidebarNavItem
$tooltip readonly constructorstringtitle / aria-label hover text.SidebarNavItem
$url readonly constructorstringPre-built link target for the href attribute.SidebarNavItem
MethodDescriptionDefined by
__construct()Creates a debugger sidebar navigation entry.SidebarNavItem
public function __construct(string $label, string $iconSvg, string $url, string $tooltip, bool $isActive)

Creates a debugger sidebar navigation entry.

Parameters

ParameterTypeDescription
$labelstring
$iconSvgstring
$urlstring
$tooltipstring
$isActivebool