# PanelRenderer

> Renders external panel descriptions exclusively through the existing debugger frontend.

[API reference](/docs/api/index.md) › [Debug Core](/docs/extensions/debug-core/reference/index.md) › [Panel](/docs/extensions/debug-core/reference/panel/index.md) › PanelRenderer

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

Renders external panel descriptions exclusively through the existing debugger frontend.

Dispatch narrows the sealed [`Block`](https://github.com/php-forge/debug/blob/e4fbb8c3238a4d011ceef5e0094344abd50deaf4/src/Presenter/Block.php) and [`Inline`](https://github.com/php-forge/debug/blob/e4fbb8c3238a4d011ceef5e0094344abd50deaf4/src/Presenter/Inline.php) unions with `instanceof`, so static analysis proves that
every value [`PanelView`](https://github.com/php-forge/debug/blob/e4fbb8c3238a4d011ceef5e0094344abd50deaf4/src/PanelView.php) produces reaches a renderer.

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`render()`](#method-render) static | Renders one panel description through the existing debugger frontend. | `PanelRenderer` |

## Method details

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

```php
public static function render(string $name, PHPForge\Debug\PanelView $view, PHPForge\Debug\Helper\Trace|null $trace = null): string
```

Renders one panel description through the existing debugger frontend.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$name` | `string` | Panel title used as the accessible heading. |
| `$view` | [`PanelView`](https://github.com/php-forge/debug/blob/e4fbb8c3238a4d011ceef5e0094344abd50deaf4/src/PanelView.php) | Description to render. |
| `$trace` | [`PHPForge\Debug\Helper\Trace`](/docs/extensions/debug-core/reference/helper/trace/index.md)`\|null` | Adapter-configured frame renderer, or `null` to use the default source links. |

**Returns**

`string`: Rendered panel markup.