# PanelRegistry

> Resolves provider defaults against the application configuration into one effective panel catalog.

[API reference](/docs/api/index.md) › [Debug Core](/docs/extensions/debug-core/reference/index.md) › [Registration](/docs/extensions/debug-core/reference/registration/index.md) › PanelRegistry

| final readonly class | `PHPForge\Debug\Registration\PanelRegistry` |
| --- | --- |
| Source | [`src/Registration/PanelRegistry.php`](https://github.com/php-forge/debug-core/blob/main/src/Registration/PanelRegistry.php#L23) |

Resolves provider defaults against the application configuration into one effective panel catalog.

Built-ins keep their registration order and every extension follows, ordered by position ascending, then by
effective title case-insensitively, then by ID.

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`disabled()`](#method-disabled) | Returns the disabled panel IDs, including entries with no default. | `PanelRegistry` |
| [`enabled()`](#method-enabled) | Returns the effective panel registrations in display order. | `PanelRegistry` |
| [`get()`](#method-get) | Returns the effective registration of a panel. | `PanelRegistry` |
| [`isDisabled()`](#method-isDisabled) | Returns whether the configuration removed a panel. | `PanelRegistry` |
| [`resolve()`](#method-resolve) static | Merges provider defaults with the application configuration and computes the display order. | `PanelRegistry` |

## Method details

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

```php
public function disabled(): list<string>
```

Returns the disabled panel IDs, including entries with no default.

**Returns**

`list<string>`: IDs removed by configuration, sorted alphabetically.

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

```php
public function enabled(): list<PHPForge\Debug\Registration\PanelRegistration>
```

Returns the effective panel registrations in display order.

**Returns**

`list<`[`PanelRegistration`](/docs/extensions/debug-core/reference/registration/panelregistration/index.md)`>`: Effective registrations in display order.

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

```php
public function get(string $id): PHPForge\Debug\Registration\PanelRegistration|null
```

Returns the effective registration of a panel.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$id` | `string` | Stable panel identifier. |

**Returns**

[`PanelRegistration`](/docs/extensions/debug-core/reference/registration/panelregistration/index.md)`|null`: Effective registration, or `null` when the ID is unknown or disabled.

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

```php
public function isDisabled(string $id): bool
```

Returns whether the configuration removed a panel.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$id` | `string` | Stable panel identifier. |

**Returns**

`bool`: Whether the ID is disabled.

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

```php
public static function resolve(iterable<PHPForge\Debug\Registration\PanelRegistration> $defaults, iterable<string, PHPForge\Debug\Registration\PanelOverride> $overrides = []): self
```

Merges provider defaults with the application configuration and computes the display order.

An override targeting an ID with no default is accepted only when it disables the entry, which covers an
optional package that is not installed; any other override for an unknown ID is a typo and is rejected.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$defaults` | `iterable<`[`PanelRegistration`](/docs/extensions/debug-core/reference/registration/panelregistration/index.md)`>` | Host built-ins first, then providers, with provider defaults. |
| `$overrides` | `iterable<string,` [`PanelOverride`](/docs/extensions/debug-core/reference/registration/paneloverride/index.md)`>` | Application configuration indexed by panel ID. |

**Returns**

`self`: Resolved catalog.

**Throws**

- [`InvalidArgumentException`](https://www.php.net/manual/en/class.invalidargumentexception.php): When a default ID is registered twice, an override targets an unknown ID without disabling it, or an override sets a position on a built-in panel.