PanelOverride
API reference › Debug Core › Registration › PanelOverride
Represents the panel metadata an application overrides in its debug configuration.
Every property stays null when the corresponding key is absent, so the provider default wins.
Properties
Section titled “Properties”| Property | Type | Description | Defined by |
|---|---|---|---|
$enabled readonly constructor | bool| | false to remove the panel from the host, or null to keep it registered. Default: null. | PanelOverride |
$icon readonly constructor | string| | Icon key replacing the provider default, or null to keep it. Default: null. | PanelOverride |
$position readonly constructor | int| | Sort weight among extensions, or null to order the entry by title. Default: null. | PanelOverride |
$title readonly constructor | string| | Display title replacing the provider default, or null to keep it. Default: null. | PanelOverride |
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
__construct() | Creates panel metadata overrides from the supplied values. | PanelOverride |
fromArray() static | Creates an override from one panel entry of the application configuration. | PanelOverride |
Constants
Section titled “Constants”| Constant | Value | Description | Defined by |
|---|---|---|---|
KEYS | ['enabled', | Configuration keys accepted by a panel entry, in alphabetical order. | PanelOverride |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct(string|null $title = null, string|null $icon = null, bool|null $enabled = null, int|null $position = null)Creates panel metadata overrides from the supplied values.
Parameters
| Parameter | Type | Description |
|---|---|---|
$title | string| | Display title replacing the provider default, or null to keep it. |
$icon | string| | Icon key replacing the provider default, or null to keep it. |
$enabled | bool| | false to remove the panel from the host, or null to keep it registered. |
$position | int| | Sort weight among extensions, or null to order the entry by title. |
fromArray()
Section titled “fromArray() ”public static function fromArray(array<array-key, mixed> $config): selfCreates an override from one panel entry of the application configuration.
Rejects unknown keys and wrong value types by key name. An empty array yields an override that changes nothing.
Parameters
| Parameter | Type | Description |
|---|---|---|
$config | array<array-key, | Panel entry keyed by PanelOverride::KEYS. |
Returns
self: Override carrying the configured values.
Throws
InvalidArgumentException: When a key is unknown, a value has the wrong type, or a value is invalid.