HistoryRowRenderer
API reference › Debug › widgets › history › HistoryRowRenderer
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>).
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
buildRowOptions() static | Builds the rowOptions attribute map for one captured-request row. The data-* attributes feed the sidebar’s history cursor. | HistoryRowRenderer |
renderAjaxCell() static | Renders the AJAX column cell ('Yes' / 'No'). | HistoryRowRenderer |
renderDurationCell() static | 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. | HistoryRowRenderer |
renderMemoryCell() static | Renders 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() static | Renders the method column cell as vocabulary-colored text, or an empty string when the method was not captured. | HistoryRowRenderer |
renderSqlCountCell() static | Renders the SQL-query column cell (count + warning chip + deep-link to the DB panel). | HistoryRowRenderer |
renderStatusCell() static | 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). | HistoryRowRenderer |
renderSummary() static | Renders the summary header (<header class="yii-debug-grid-summary">) with the request total and the status-bucket pills. | HistoryRowRenderer |
renderTagCell() static | Renders the request-tag column cell as a link to the panel view. | HistoryRowRenderer |
renderTimeCell() static | Renders the time column cell — compact HH:MM:SS with a full yyyy-MM-dd HH:mm:ss tooltip on hover. | HistoryRowRenderer |
renderUrlCell() static | Renders the URL column cell with a hover-truncate wrapper. | HistoryRowRenderer |
Method details
Section titled “Method details”buildRowOptions()
Section titled “buildRowOptions() ”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
| Parameter | Type | Description |
|---|---|---|
$row | HistoryRow | Typed history row. |
$searchModel | yii\ | Search model deciding whether the row’s status counts as critical. |
Returns
array<string, mixed>: Attribute map the GridView applies to the <tr>.
renderAjaxCell()
Section titled “renderAjaxCell() ”public static function renderAjaxCell(PHPForge\Debug\View\History\HistoryRow $row): stringRenders the AJAX column cell ('Yes' / 'No').
renderDurationCell()
Section titled “renderDurationCell() ”public static function renderDurationCell(PHPForge\Debug\View\History\HistoryRow $row, float $maxProcessingTime): stringRenders 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
| Parameter | Type | Description |
|---|---|---|
$row | HistoryRow | Typed history row. |
$maxProcessingTime | float | Page maximum in seconds (HistoryScale::$maxProcessingTime). |
Returns
string: Rendered cell.
renderMemoryCell()
Section titled “renderMemoryCell() ”public static function renderMemoryCell(PHPForge\Debug\View\History\HistoryRow $row, int $maxPeakMemory): stringRenders the memory column cell ('X.XXX MB' or '(not set)'), with a micro-gauge rail scaled against the page
maximum when one exists.
Parameters
| Parameter | Type | Description |
|---|---|---|
$row | HistoryRow | Typed history row. |
$maxPeakMemory | int | Page maximum in bytes (HistoryScale::$maxPeakMemory). |
Returns
string: Rendered cell.
renderMethodCell()
Section titled “renderMethodCell() ”public static function renderMethodCell(PHPForge\Debug\View\History\HistoryRow $row): stringRenders the method column cell as vocabulary-colored text, or an empty string when the method was not captured.
Parameters
| Parameter | Type | Description |
|---|---|---|
$row | HistoryRow | Typed history row. |
Returns
string: Rendered cell, or '' when no method was captured.
renderSqlCountCell()
Section titled “renderSqlCountCell() ”public static function renderSqlCountCell(PHPForge\Debug\View\History\HistoryRow $row, yii\debug\panels\DbPanel $dbPanel): stringRenders the SQL-query column cell (count + warning chip + deep-link to the DB panel).
Parameters
| Parameter | Type | Description |
|---|---|---|
$row | HistoryRow | Typed history row. |
$dbPanel | yii\ | Panel supplying the critical-query threshold. |
Returns
string: Rendered cell.
renderStatusCell()
Section titled “renderStatusCell() ”public static function renderStatusCell(PHPForge\Debug\View\History\HistoryRow $row): stringRenders 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).
renderSummary()
Section titled “renderSummary() ”public static function renderSummary(PHPForge\Debug\View\History\HistorySummary $summary): stringRenders the summary header (<header class="yii-debug-grid-summary">) with the request total and the
status-bucket pills.
Parameters
| Parameter | Type | Description |
|---|---|---|
$summary | HistorySummary | Totals and status buckets for the listed captures. |
Returns
string: Rendered header, or '' when no request was captured.
renderTagCell()
Section titled “renderTagCell() ”public static function renderTagCell(PHPForge\Debug\View\History\HistoryRow $row): stringRenders the request-tag column cell as a link to the panel view.
renderTimeCell()
Section titled “renderTimeCell() ”public static function renderTimeCell(PHPForge\Debug\View\History\HistoryRow $row): stringRenders the time column cell — compact HH:MM:SS with a full yyyy-MM-dd HH:mm:ss tooltip on hover.
Parameters
| Parameter | Type | Description |
|---|---|---|
$row | HistoryRow | Typed history row. |
Returns
string: Rendered cell, or a muted placeholder when no time was captured.
renderUrlCell()
Section titled “renderUrlCell() ”public static function renderUrlCell(PHPForge\Debug\View\History\HistoryRow $row): stringRenders the URL column cell with a hover-truncate wrapper.