# Disclosure

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

[API reference](/docs/api/index.md) › [Debug Core](/docs/extensions/debug-core/reference/index.md) › [Helper](/docs/extensions/debug-core/reference/helper/index.md) › Disclosure

| final class | `PHPForge\Debug\Helper\Disclosure` |
| --- | --- |
| Source | [`src/Helper/Disclosure.php`](https://github.com/php-forge/debug-core/blob/main/src/Helper/Disclosure.php#L15) |

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

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`hint()`](#method-hint) static | Renders the expand/collapse affordance shown on the right of a summary. | `Disclosure` |
| [`render()`](#method-render) static | Renders a titled collapsible section. | `Disclosure` |

## Method details

### hint() <span id="method-hint"></span>

```php
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`](/docs/extensions/html/reference/phrasing/span/index.md): Expand/collapse hint element.

### render() <span id="method-render"></span>

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

Renders 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.