DbSummaryRenderer
API reference › Debug Core › Panel › Db › DbSummaryRenderer
Renders request-wide Database totals independently of adapter grid widgets.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
render() static | Renders the grid summary header with the request-wide totals and the optional page-size selector. | DbSummaryRenderer |
toolbarTitle() static | Builds the toolbar chip title, reporting the executed query count or the active warning sentences. | DbSummaryRenderer |
Method details
Section titled “Method details”render()
Section titled “render() ”public static function render(PHPForge\Debug\Panel\Db\DbSummary $summary, string|null $pageSize = null): stringRenders the grid summary header with the request-wide totals and the optional page-size selector.
Parameters
| Parameter | Type | Description |
|---|---|---|
$summary | DbSummary | Request-wide Database metrics. |
$pageSize | string| | Rendered page-size selector appended after the totals, or null to omit it. |
Returns
string: Summary header markup.
toolbarTitle()
Section titled “toolbarTitle() ”public static function toolbarTitle(PHPForge\Debug\Panel\Db\DbSummary $summary, int|null $criticalQueryThreshold, int|null $excessiveCallerThreshold): stringBuilds the toolbar chip title, reporting the executed query count or the active warning sentences.
Warnings replace the count entirely: the critical-count sentence comes first, the excessive-caller sentence second, and both are joined by a newline when they apply together.
Parameters
| Parameter | Type | Description |
|---|---|---|
$summary | DbSummary | Request-wide Database metrics. |
$criticalQueryThreshold | int| | Query count above which the request is critical, or null to disable. |
$excessiveCallerThreshold | int| | Statements per call site that flag it, or null to disable. |
Returns
string: Warning sentences when a threshold is exceeded, otherwise the executed-query count.