BuiltInPanelList
API reference › Yii3 Debug › Panel › BuiltInPanelList
Assembles the built-in panels in the display order BuiltInPanels::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
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
fromMap() static | Creates the list from the built-in panels keyed by ID, in the order BuiltInPanels::IDS declares. | BuiltInPanelList |
panels() | Returns the built-in panels every host navigation starts from. | BuiltInPanelList |
Method details
Section titled “Method details”fromMap()
Section titled “fromMap() ”public static function fromMap(array<string, Yii3\Debug\Panel\ExtensionPanelInterface> $panelsById): selfCreates the list from the built-in panels keyed by ID, in the order BuiltInPanels::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> | Built-in panels keyed by their ID. |
Returns
self: List holding the built-in panels in display order.
Throws
InvalidArgumentException: 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()
Section titled “panels() ”public function panels(): list<Yii3\Debug\Panel\ExtensionPanelInterface>Returns the built-in panels every host navigation starts from.
Returns
list<ExtensionPanelInterface>: Built-in panels in display order.