CellMore
API reference › Debug Core › Helper › CellMore
Wraps long grid-cell content in a collapsible clamp with an expand/collapse pill toggle.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
clamp() static | Wraps the content only when its source payload is long enough to be worth collapsing. | CellMore |
wrap() static | Wraps the rendered cell content in the collapsible clamp container. | CellMore |
Constants
Section titled “Constants”| Constant | Value | Description | Defined by |
|---|---|---|---|
ROW_THRESHOLD | 12 | Row count beyond which a table is worth collapsing. | CellMore |
THRESHOLD | 600 | Source length (bytes) beyond which a cell is worth collapsing. | CellMore |
Method details
Section titled “Method details”clamp()
Section titled “clamp() ”public static function clamp(string $content, string $source): stringWraps the content only when its source payload is long enough to be worth collapsing.
The decision reads the raw source rather than the rendered markup, so highlighting or trace lists never tip a short value over the threshold.
Parameters
| Parameter | Type | Description |
|---|---|---|
$content | string | Rendered cell HTML. |
$source | string | Raw payload the content was rendered from. |
Returns
string: Original content or collapsible markup when the source exceeds the threshold.
wrap()
Section titled “wrap() ”public static function wrap(string $content): stringWraps the rendered cell content in the collapsible clamp container.
Parameters
| Parameter | Type | Description |
|---|---|---|
$content | string | Rendered cell HTML to clamp; emitted verbatim inside the body container. |
Returns
string: Collapsible cell markup.