ThemeResolver
API reference › Debug Core › Theme › ThemeResolver
Resolves the effective debugger theme from the request’s cookie and query parameters.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
resolve() static | Returns the effective theme ('light' or 'dark'). | ThemeResolver |
Constants
Section titled “Constants”| Constant | Value | Description | Defined by |
|---|---|---|---|
COOKIE | 'yii-debug-toolbar-theme' | Cookie written by the client-side theme toggle. | ThemeResolver |
QUERY_PARAM | 'yii_debug_theme' | Query parameter carrying the link-time theme snapshot. | ThemeResolver |
Method details
Section titled “Method details”resolve()
Section titled “resolve() ”public static function resolve(array<array-key, mixed> $cookieParams, array<array-key, mixed> $queryParams): stringReturns the effective theme ('light' or 'dark').
Parameters
| Parameter | Type | Description |
|---|---|---|
$cookieParams | array<array-key, | Request cookies. |
$queryParams | array<array-key, | Parsed query parameters. |
Returns
string