TimelineRenderer
API reference › Debug Core › Panel › Timeline › TimelineRenderer
Renders the shared Timeline summary, filters, empty hint, and positioned span chart.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
renderChart() static | Renders the complete timeline chart from prepared spans and ruler offsets. | TimelineRenderer |
renderEmptyHint() static | Renders the empty-state hint linking to the sortable Profiling panel. | TimelineRenderer |
renderFilterForm() static | Renders the filter form while preserving adapter-owned route parameters. | TimelineRenderer |
renderSummary() static | Renders total duration, peak memory, and visible span count. | TimelineRenderer |
Method details
Section titled “Method details”renderChart()
Section titled “renderChart() ”public static function renderChart(list<PHPForge\Debug\Panel\Timeline\TimelineSpanRow> $rows, array<int, float> $rulers, string $memorySvg = '', int $memory = 0, int $memoryHeight = 40): stringRenders the complete timeline chart from prepared spans and ruler offsets.
Parameters
| Parameter | Type | Description |
|---|---|---|
$rows | list<TimelineSpanRow> | Positioned timeline spans. |
$rulers | array<int, | Ruler offsets keyed by milliseconds. |
$memorySvg | string | Inline memory graph markup, or an empty string to omit the footer. |
$memory | int | Peak memory reported in the footer, in bytes. |
$memoryHeight | int | Memory graph track height, in pixels. |
Returns
string: Chart markup, or an empty string when no span survived filtering.
renderEmptyHint()
Section titled “renderEmptyHint() ”public static function renderEmptyHint(bool $hasRows, string $profilingUrl): stringRenders the empty-state hint linking to the sortable Profiling panel.
Parameters
| Parameter | Type | Description |
|---|---|---|
$hasRows | bool | Whether any span survived filtering. |
$profilingUrl | string | URL of the Profiling panel for the same request. |
Returns
string: Hint markup, or an empty string when spans are present.
renderFilterForm()
Section titled “renderFilterForm() ”public static function renderFilterForm(string $action, array<string, string> $hiddenParams, string $duration, string $category): stringRenders the filter form while preserving adapter-owned route parameters.
Parameters
| Parameter | Type | Description |
|---|---|---|
$action | string | Form action URL owned by the adapter. |
$hiddenParams | array<string, | Hidden route and theme parameters. |
$duration | string | Minimum duration filter, in milliseconds. |
$category | string | Category filter matched against span names. |
Returns
string: Filter form markup.
renderSummary()
Section titled “renderSummary() ”public static function renderSummary(float $duration, int $memory, int $spanCount): stringRenders total duration, peak memory, and visible span count.
Parameters
| Parameter | Type | Description |
|---|---|---|
$duration | float | Total request duration, in milliseconds. |
$memory | int | Peak memory, in bytes. |
$spanCount | int | Number of spans left after filtering. |
Returns
string: Summary header markup.