# BuiltInPanelList

> Assembles the built-in panels in the display order Yii3\Debug\Panel\BuiltInPanels::IDS declares.

[API reference](/docs/api/index.md) › [Yii3 Debug](/docs/extensions/yii3-debug/reference/index.md) › [Panel](/docs/extensions/yii3-debug/reference/panel/index.md) › BuiltInPanelList

| final readonly class | `Yii3\Debug\Panel\BuiltInPanelList` |
| --- | --- |
| Source | [`src/Panel/BuiltInPanelList.php`](https://github.com/yii3/debug/blob/main/src/Panel/BuiltInPanelList.php#L18) |

Assembles the built-in panels in the display order [`BuiltInPanels::IDS`](/docs/extensions/yii3-debug/reference/panel/builtinpanels/index.md#const-IDS) declares.

`IDS` is the single order the sidebar and the toolbar both follow: the list takes the panels keyed by ID and orders
them from `IDS` alone, so adding a built-in means one entry there and one panel in the map.

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`fromMap()`](#method-fromMap) static | Creates the list from the built-in panels keyed by ID, in the order [`BuiltInPanels::IDS`](/docs/extensions/yii3-debug/reference/panel/builtinpanels/index.md#const-IDS) declares. | `BuiltInPanelList` |
| [`panels()`](#method-panels) | Returns the built-in panels every host navigation starts from. | `BuiltInPanelList` |

## Method details

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

```php
public static function fromMap(array<string, Yii3\Debug\Panel\ExtensionPanelInterface> $panelsById): self
```

Creates the list from the built-in panels keyed by ID, in the order [`BuiltInPanels::IDS`](/docs/extensions/yii3-debug/reference/panel/builtinpanels/index.md#const-IDS) declares.

The order of the map is irrelevant; every ID of `IDS` must have a panel, and every panel must be keyed by the ID
it declares.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$panelsById` | `array<string,` [`ExtensionPanelInterface`](/docs/extensions/yii3-debug/reference/panel/extensionpanelinterface/index.md)`>` | Built-in panels keyed by their ID. |

**Returns**

`self`: List holding the built-in panels in display order.

**Throws**

- [`InvalidArgumentException`](https://www.php.net/manual/en/class.invalidargumentexception.php): when a key is not a built-in ID, a panel declares an ID other than its key, or a built-in ID has no panel.

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

```php
public function panels(): list<Yii3\Debug\Panel\ExtensionPanelInterface>
```

Returns the built-in panels every host navigation starts from.

**Returns**

`list<`[`ExtensionPanelInterface`](/docs/extensions/yii3-debug/reference/panel/extensionpanelinterface/index.md)`>`: Built-in panels in display order.