Skip to content
PHP Ecosystem
Explore

BuiltInPanelList

API reference › Yii3 Debug › Panel › BuiltInPanelList

final readonly classYii3\Debug\Panel\BuiltInPanelList
Sourcesrc/Panel/BuiltInPanelList.php

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.

MethodDescriptionDefined by
fromMap() staticCreates 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
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 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

ParameterTypeDescription
$panelsByIdarray<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.
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.