PanelRegistrar
API reference › Debug › service › PanelRegistrar
Instantiates the configured debug panels and resolves the catalog describing their display order.
Built-in panels are omitted when their optional package is unavailable. Explicit application configuration remains authoritative and may still register a custom panel under the same ID.
Panels are published on Module::$panels as they are built, so a panel reading a sibling while it binds
itself sees every entry registered before it.
Properties
Section titled “Properties”| Property | Type | Description | Defined by |
|---|---|---|---|
$module protected readonly constructor | yii\ | Debug module owning the panels and read for configuration at call time. | PanelRegistrar |
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
__construct() | Binds panel registration to the debug module. | PanelRegistrar |
register() | Instantiates every configured panel, binds it to the module, and returns the catalog in display order. | PanelRegistrar |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct(yii\debug\Module $module)Binds panel registration to the debug module.
Parameters
| Parameter | Type | Description |
|---|---|---|
$module | yii\ | Debug module owning the panels and read for configuration at call time. |
register()
Section titled “register() ”public function register(array<string, array<string, mixed>|class-string<yii\debug\Panel>|class-string<PHPForge\Debug\Panel>|string> $core, array<array-key, array<string, mixed>|yii\debug\Panel|PHPForge\Debug\Panel|string> $configured): yii\debug\service\PanelCatalogInstantiates every configured panel, binds it to the module, and returns the catalog in display order.
An entry declaring enabled as false is skipped before its class is resolved and is reported by
PanelRegistry::disabled(); title and icon overrides apply to portable panels only, because a Yii
panel renders the metadata it declares itself. A panel whose Panel::isEnabled() returns false is
dropped after construction.
Parameters
| Parameter | Type | Description |
|---|---|---|
$core | array<string,yii\>| | Built-in panel definitions indexed by panel ID. |
$configured | array<array-key,yii\| | Panel definitions declared by the application. |
Returns
PanelCatalog: Registered panels in display order and the catalog describing them.
Throws
yii\base\InvalidConfigException: when a definition, a registration option, or the resolved catalog is invalid.