Disclosure
API reference › Debug Core › Helper › Disclosure
Renders the shared collapsible section: a titled <summary> with an expand/collapse hint over a <details> body.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
hint() static | Renders the expand/collapse affordance shown on the right of a summary. | Disclosure |
render() static | Renders a titled collapsible section. | Disclosure |
Method details
Section titled “Method details”hint()
Section titled “hint() ”public static function hint(): UIAwesome\Html\Phrasing\SpanRenders 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.
render()
Section titled “render() ”public static function render(string $title, string $body, bool $open = false): stringRenders a titled collapsible section.
Parameters
| Parameter | Type | Description |
|---|---|---|
$title | string | Section heading shown in the summary. |
$body | string | Rendered HTML revealed when the section expands. |
$open | bool | Whether the section is expanded initially. |
Returns
string: Collapsible section markup.