Table
API reference › Debug Core › Helper › Table
Builds the shared debugger table shell: an optional column-header row above the body rows, inside a scroll wrapper.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
build() static | Builds the <table> element, prepending a <thead> row of <th scope="col"> cells when labels are supplied. | Table |
render() static | Renders the table shell inside its scroll wrapper. | Table |
Method details
Section titled “Method details”build()
Section titled “build() ”public static function build(list<string> $headers, list<UIAwesome\Html\Table\Tr> $rows, string $class = \PHPForge\Debug\Theme\Css::TABLE): UIAwesome\Html\Table\TableBuilds the <table> element, prepending a <thead> row of <th scope="col"> cells when labels are supplied.
Exposed on its own so sections that decorate the shell (extra attributes, a fixed layout) still share one header and body contract.
Parameters
| Parameter | Type | Description |
|---|---|---|
$headers | list<string> | Column labels, or [] for a table without a header row. |
$rows | list<UIAwesome\> | Body rows in display order. |
$class | string | Table CSS classes. |
Returns
UIAwesome\Html\Table\Table: Table element.
render()
Section titled “render() ”public static function render(list<string> $headers, list<UIAwesome\Html\Table\Tr> $rows, string $tableClass = \PHPForge\Debug\Theme\Css::TABLE, string $wrapClass = \PHPForge\Debug\Theme\Css::TABLE_WRAP): stringRenders the table shell inside its scroll wrapper.
Parameters
| Parameter | Type | Description |
|---|---|---|
$headers | list<string> | Column labels, or [] for a table without a header row. |
$rows | list<UIAwesome\> | Body rows in display order. |
$tableClass | string | Table CSS classes. |
$wrapClass | string | Scroll-wrapper CSS classes. |
Returns
string: Wrapped table markup.