Skip to content
PHP Ecosystem
Explore

Tabs

API reference › Debug Core › Helper › Tabs

final classPHPForge\Debug\Helper\Tabs
Sourcesrc/Helper/Tabs.php

Renders the shared accessible tab pattern used by debug panels.

MethodDescriptionDefined by
render() staticRenders the tab list and its panels as one markup fragment.Tabs
public static function render(non-empty-string $id, non-empty-string $ariaLabel, list<array{label: string, content: string}> $tabs, int $activeIndex = 0): string

Renders the tab list and its panels as one markup fragment.

Parameters

ParameterTypeDescription
$idnon-empty-stringBase ID every tab and panel ID derives from.
$ariaLabelnon-empty-stringAccessible name announced for the tab list.
$tabslist<array{label: string, content: string}>Tabs in display order.
$activeIndexintZero-based index of the tab selected on initial render.

Returns

string: Rendered tab list followed by its panels.