Skip to content
PHP Ecosystem
Explore

Disclosure

API reference › Debug Core › Helper › Disclosure

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

Renders the shared collapsible section: a titled <summary> with an expand/collapse hint over a <details> body.

MethodDescriptionDefined by
hint() staticRenders the expand/collapse affordance shown on the right of a summary.Disclosure
render() staticRenders a titled collapsible section.Disclosure
public static function hint(): UIAwesome\Html\Phrasing\Span

Renders the expand/collapse affordance shown on the right of a summary.

Exposed on its own so sections that build their own <summary> (the phpinfo Overview blocks) still share one wording and one behaviour.

Returns

UIAwesome\Html\Phrasing\Span: Expand/collapse hint element.

public static function render(string $title, string $body, bool $open = false): string

Renders a titled collapsible section.

Parameters

ParameterTypeDescription
$titlestringSection heading shown in the summary.
$bodystringRendered HTML revealed when the section expands.
$openboolWhether the section is expanded initially.

Returns

string: Collapsible section markup.