Skip to content
PHP Ecosystem
Explore

CellMore

API reference › Debug Core › Helper › CellMore

final classPHPForge\Debug\Helper\CellMore
Sourcesrc/Helper/CellMore.php

Wraps long grid-cell content in a collapsible clamp with an expand/collapse pill toggle.

MethodDescriptionDefined by
clamp() staticWraps the content only when its source payload is long enough to be worth collapsing.CellMore
wrap() staticWraps the rendered cell content in the collapsible clamp container.CellMore
ConstantValueDescriptionDefined by
ROW_THRESHOLD12Row count beyond which a table is worth collapsing.CellMore
THRESHOLD600Source length (bytes) beyond which a cell is worth collapsing.CellMore
public static function clamp(string $content, string $source): string

Wraps 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

ParameterTypeDescription
$contentstringRendered cell HTML.
$sourcestringRaw payload the content was rendered from.

Returns

string: Original content or collapsible markup when the source exceeds the threshold.

public static function wrap(string $content): string

Wraps the rendered cell content in the collapsible clamp container.

Parameters

ParameterTypeDescription
$contentstringRendered cell HTML to clamp; emitted verbatim inside the body container.

Returns

string: Collapsible cell markup.