Skip to content
PHP Ecosystem
Explore

HistoryCellRenderer

API reference › Debug Core › View › History › HistoryCellRenderer

final classPHPForge\Debug\View\History\HistoryCellRenderer
Sourcesrc/View/History/HistoryCellRenderer.php

Renders the History index summary header + the per-cell HTML consumed by the grid columns and the typed row-attributes builder.

MethodDescriptionDefined by
buildRowAttributes() staticBuilds the row-attributes map for one captured-request row. The data-* attributes feed the sidebar’s history cursor.HistoryCellRenderer
renderAjaxCell() staticRenders the AJAX column cell ('Yes' / 'No').HistoryCellRenderer
renderDurationCell() staticRenders the duration column cell ('X ms' or '(not set)' muted placeholder when missing), with a micro-gauge rail scaled against the page maximum when one exists.HistoryCellRenderer
renderMemoryCell() staticRenders the memory column cell ('X.XXX MB' or '(not set)'), with a micro-gauge rail scaled against the page maximum when one exists.HistoryCellRenderer
renderMethodCell() staticRenders the method column cell as vocabulary-colored text, or an empty string when the method was not captured.HistoryCellRenderer
renderSqlCountCell() staticRenders the SQL-query column cell (count + warning chip + deep-link to the DB panel).HistoryCellRenderer
renderStatusCell() staticRenders the status-code badge cell; an uncaptured (0) code renders the muted dash pill, never a 200.HistoryCellRenderer
renderSummary() staticRenders the summary header (<header class="yii-debug-grid-summary">) with the request total and the status-bucket pills.HistoryCellRenderer
renderTagCell() staticRenders the request-tag column cell as a link to the panel view.HistoryCellRenderer
renderTimeCell() staticRenders the time column cell — compact HH:MM:SS with a full Y-m-d H:i:s tooltip on hover.HistoryCellRenderer
renderUrlCell() staticRenders the URL column cell with a hover-truncate wrapper.HistoryCellRenderer
public static function buildRowAttributes(PHPForge\Debug\View\History\HistoryRow $row, bool $isCritical): array<string, mixed>

Builds the row-attributes map for one captured-request row. The data-* attributes feed the sidebar’s history cursor.

Parameters

ParameterTypeDescription
$rowHistoryRowTyped history row.
$isCriticalboolWhether the row’s status code counts as critical (adds the danger row class).

Returns

array<string, mixed>

public static function renderAjaxCell(PHPForge\Debug\View\History\HistoryRow $row): string

Renders the AJAX column cell ('Yes' / 'No').

Parameters

ParameterTypeDescription
$rowHistoryRow

Returns

string

public static function renderDurationCell(PHPForge\Debug\View\History\HistoryRow $row, float $maxProcessingTime): string

Renders the duration column cell ('X ms' or '(not set)' muted placeholder when missing), with a micro-gauge rail scaled against the page maximum when one exists.

Parameters

ParameterTypeDescription
$rowHistoryRowTyped history row.
$maxProcessingTimefloatPage maximum in seconds (HistoryScale::$maxProcessingTime).

Returns

string

public static function renderMemoryCell(PHPForge\Debug\View\History\HistoryRow $row, int $maxPeakMemory): string

Renders the memory column cell ('X.XXX MB' or '(not set)'), with a micro-gauge rail scaled against the page maximum when one exists.

Parameters

ParameterTypeDescription
$rowHistoryRowTyped history row.
$maxPeakMemoryintPage maximum in bytes (HistoryScale::$maxPeakMemory).

Returns

string

public static function renderMethodCell(PHPForge\Debug\View\History\HistoryRow $row): string

Renders the method column cell as vocabulary-colored text, or an empty string when the method was not captured.

Parameters

ParameterTypeDescription
$rowHistoryRow

Returns

string

public static function renderSqlCountCell(PHPForge\Debug\View\History\HistoryRow $row, string $url, bool $isQueryCountCritical, int $criticalQueryThreshold): string

Renders the SQL-query column cell (count + warning chip + deep-link to the DB panel).

Parameters

ParameterTypeDescription
$rowHistoryRowTyped history row.
$urlstringPre-built link target to the DB panel view for this request.
$isQueryCountCriticalboolWhether the row’s query count exceeds the critical threshold.
$criticalQueryThresholdintThreshold surfaced in the warning tooltip when the count is critical.

Returns

string

public static function renderStatusCell(PHPForge\Debug\View\History\HistoryRow $row): string

Renders the status-code badge cell; an uncaptured (0) code renders the muted dash pill, never a 200.

Parameters

ParameterTypeDescription
$rowHistoryRow

Returns

string

public static function renderSummary(PHPForge\Debug\View\History\HistorySummary $summary, array<string, string> $bucketUrls, string $pageSizeHtml): string

Renders the summary header (<header class="yii-debug-grid-summary">) with the request total and the status-bucket pills.

Parameters

ParameterTypeDescription
$summaryHistorySummaryTyped summary aggregate.
$bucketUrlsarray<string, string>Bucket-label-to-URL map for the pill deep links (missing labels render without an href).
$pageSizeHtmlstringPre-rendered page-size selector markup supplied by the adapter.

Returns

string

public static function renderTagCell(PHPForge\Debug\View\History\HistoryRow $row, string $url): string

Renders the request-tag column cell as a link to the panel view.

Parameters

ParameterTypeDescription
$rowHistoryRowTyped history row.
$urlstringPre-built link target to the request’s panel view.

Returns

string

public static function renderTimeCell(PHPForge\Debug\View\History\HistoryRow $row): string

Renders the time column cell — compact HH:MM:SS with a full Y-m-d H:i:s tooltip on hover.

Parameters

ParameterTypeDescription
$rowHistoryRow

Returns

string

public static function renderUrlCell(PHPForge\Debug\View\History\HistoryRow $row): string

Renders the URL column cell with a hover-truncate wrapper.

Parameters

ParameterTypeDescription
$rowHistoryRow

Returns

string