Skip to content
PHP Ecosystem
Explore

HistoryRowRenderer

API reference › Debug › widgets › history › HistoryRowRenderer

final classyii\debug\widgets\history\HistoryRowRenderer
Sourcesrc/widgets/history/HistoryRowRenderer.php

Renders the History index summary header + the per-cell HTML consumed by the GridView columns and the typed rowOptions builder.

Stateless static helpers; every method takes a typed HistoryRow or HistorySummary and returns a ready-to-echo HTML string (or, for the row options builder, the attribute map the GridView consumes for <tr>).

MethodDescriptionDefined by
buildRowOptions() staticBuilds the rowOptions attribute map for one captured-request row. The data-* attributes feed the sidebar’s history cursor.HistoryRowRenderer
renderAjaxCell() staticRenders the AJAX column cell ('Yes' / 'No').HistoryRowRenderer
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.HistoryRowRenderer
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.HistoryRowRenderer
renderMethodCell() staticRenders the method column cell as vocabulary-colored text, or an empty string when the method was not captured.HistoryRowRenderer
renderSqlCountCell() staticRenders the SQL-query column cell (count + warning chip + deep-link to the DB panel).HistoryRowRenderer
renderStatusCell() staticRenders the status column cell as a tone badge of the HTTP status code, or a muted dash pill when the code was not captured (0).HistoryRowRenderer
renderSummary() staticRenders the summary header (<header class="yii-debug-grid-summary">) with the request total and the status-bucket pills.HistoryRowRenderer
renderTagCell() staticRenders the request-tag column cell as a link to the panel view.HistoryRowRenderer
renderTimeCell() staticRenders the time column cell — compact HH:MM:SS with a full yyyy-MM-dd HH:mm:ss tooltip on hover.HistoryRowRenderer
renderUrlCell() staticRenders the URL column cell with a hover-truncate wrapper.HistoryRowRenderer
public static function buildRowOptions(PHPForge\Debug\View\History\HistoryRow $row, yii\debug\models\search\DebugSearch $searchModel): array<string, mixed>

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

Parameters

ParameterTypeDescription
$rowHistoryRowTyped history row.
$searchModelyii\debug\models\search\DebugSearchSearch model deciding whether the row’s status counts as critical.

Returns

array<string, mixed>: Attribute map the GridView applies to the <tr>.

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

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

Parameters

ParameterTypeDescription
$rowHistoryRowTyped history row.

Returns

string: Rendered cell.

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: Rendered cell.

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: Rendered cell.

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
$rowHistoryRowTyped history row.

Returns

string: Rendered cell, or '' when no method was captured.

public static function renderSqlCountCell(PHPForge\Debug\View\History\HistoryRow $row, yii\debug\panels\DbPanel $dbPanel): string

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

Parameters

ParameterTypeDescription
$rowHistoryRowTyped history row.
$dbPanelyii\debug\panels\DbPanelPanel supplying the critical-query threshold.

Returns

string: Rendered cell.

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

Renders the status column cell as a tone badge of the HTTP status code, or a muted dash pill when the code was not captured (0).

Parameters

ParameterTypeDescription
$rowHistoryRowTyped history row.

Returns

string: Rendered cell.

public static function renderSummary(PHPForge\Debug\View\History\HistorySummary $summary): string

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

Parameters

ParameterTypeDescription
$summaryHistorySummaryTotals and status buckets for the listed captures.

Returns

string: Rendered header, or '' when no request was captured.

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

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

Parameters

ParameterTypeDescription
$rowHistoryRowTyped history row.

Returns

string: Rendered cell.

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

Renders the time column cell — compact HH:MM:SS with a full yyyy-MM-dd HH:mm:ss tooltip on hover.

Parameters

ParameterTypeDescription
$rowHistoryRowTyped history row.

Returns

string: Rendered cell, or a muted placeholder when no time was captured.

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

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

Parameters

ParameterTypeDescription
$rowHistoryRowTyped history row.

Returns

string: Rendered cell.