Tabs
API reference › Debug Core › Helper › Tabs
Renders the shared accessible tab pattern used by debug panels.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
render() static | Renders the tab list and its panels as one markup fragment. | Tabs |
Method details
Section titled “Method details”render()
Section titled “render() ”public static function render(non-empty-string $id, non-empty-string $ariaLabel, list<array{label: string, content: string}> $tabs, int $activeIndex = 0): stringRenders the tab list and its panels as one markup fragment.
Parameters
| Parameter | Type | Description |
|---|---|---|
$id | non-empty-string | Base ID every tab and panel ID derives from. |
$ariaLabel | non-empty-string | Accessible name announced for the tab list. |
$tabs | list<array{label: string, | Tabs in display order. |
$activeIndex | int | Zero-based index of the tab selected on initial render. |
Returns
string: Rendered tab list followed by its panels.