Skip to content
PHP Ecosystem
Explore

LogCellRenderer

API reference › Debug Core › Panel › Log › LogCellRenderer

final classPHPForge\Debug\Panel\Log\LogCellRenderer
Sourcesrc/Panel/Log/LogCellRenderer.php

Renders the typed cells of the logs grid for the Log debug panel.

MethodDescriptionDefined by
buildRowOptions() staticBuilds the GridView rowOptions array for the row: anchor id (log-{N}) and severity-driven CSS class.LogCellRenderer
renderCategoryCell() staticRenders the category as the shared Fqcn::renderLabel() two-tone label.LogCellRenderer
renderLevelCell() staticRenders the level name as a vocabulary-tinted chip (error, warning, info, trace, profile).LogCellRenderer
renderMessageCell() staticRenders the message cell, followed by the optional context disclosure and the optional trace list.LogCellRenderer
renderTimeCell() staticRenders the capture time as H:i:s.mmm, derived from the row’s millisecond timestamp.LogCellRenderer
renderTimeSincePreviousCell() staticRenders the time-since-previous cell with the prev/next anchor navigation buttons.LogCellRenderer
public static function buildRowOptions(PHPForge\Debug\Panel\Log\LogRow $row): array<string, mixed>

Builds the GridView rowOptions array for the row: anchor id (log-{N}) and severity-driven CSS class.

Parameters

ParameterTypeDescription
$rowLogRow

Returns

array<string, mixed>: Attribute map with id and (optionally) class keys.

public static function renderCategoryCell(PHPForge\Debug\Panel\Log\LogRow $row): string

Renders the category as the shared Fqcn::renderLabel() two-tone label.

Parameters

ParameterTypeDescription
$rowLogRow

Returns

string

public static function renderLevelCell(PHPForge\Debug\Panel\Log\LogRow $row): string

Renders the level name as a vocabulary-tinted chip (error, warning, info, trace, profile).

Parameters

ParameterTypeDescription
$rowLogRow

Returns

string

public static function renderMessageCell(PHPForge\Debug\Panel\Log\LogRow $row, Closure(array<string, mixed>): string $traceLine): string

Renders the message cell, followed by the optional context disclosure and the optional trace list.

SQL renders highlighted, a print_r() or var_export() dump as a DumpTreeRenderer tree, and any other message as escaped text; the message is escaped once.

Parameters

ParameterTypeDescription
$rowLogRow
$traceLineClosure(array<string, mixed>): stringRenders one backtrace frame as a link line.

Returns

string

public static function renderTimeCell(PHPForge\Debug\Panel\Log\LogRow $row): string

Renders the capture time as H:i:s.mmm, derived from the row’s millisecond timestamp.

Parameters

ParameterTypeDescription
$rowLogRow

Returns

string

public static function renderTimeSincePreviousCell(PHPForge\Debug\Panel\Log\LogRow $row): string

Renders the time-since-previous cell with the prev/next anchor navigation buttons.

Parameters

ParameterTypeDescription
$rowLogRow

Returns

string