Skip to content
PHP Ecosystem
Explore

PanelRegistrar

API reference › Debug › service › PanelRegistrar

classyii\debug\service\PanelRegistrar
Sourcesrc/service/PanelRegistrar.php

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.

PropertyTypeDescriptionDefined by
$module protected readonly constructoryii\debug\ModuleDebug module owning the panels and read for configuration at call time.PanelRegistrar
MethodDescriptionDefined 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
public function __construct(yii\debug\Module $module)

Binds panel registration to the debug module.

Parameters

ParameterTypeDescription
$moduleyii\debug\ModuleDebug module owning the panels and read for configuration at call time.
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\PanelCatalog

Instantiates 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

ParameterTypeDescription
$corearray<string, array<string, mixed>|class-string<yii\debug\Panel>|class-string<PHPForge\Debug\Panel>|string>Built-in panel definitions indexed by panel ID.
$configuredarray<array-key, array<string, mixed>|yii\debug\Panel|PHPForge\Debug\Panel|string>Panel definitions declared by the application.

Returns

PanelCatalog: Registered panels in display order and the catalog describing them.

Throws