ShellContextFactory
API reference › Debug › service › ShellContextFactory
Builds the page shell of the debugger actions: the bare shell installed before an action runs, and the full shell with brand bar and sidebar of the history, panel, and standalone pages.
Properties
Section titled “Properties”| Property | Type | Description | Defined by |
|---|---|---|---|
$module protected readonly constructor | yii\ | Debug module read for the page title and the Configuration panel at call time. | ShellContextFactory |
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
__construct() | Binds debugger page-shell creation to the debug module. | ShellContextFactory |
bare() | Returns the shell that echoes raw content without the brand bar or sidebar. | ShellContextFactory |
forSnapshot() | Returns the shell of an index, view, or standalone page. | ShellContextFactory |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct(yii\debug\Module $module)Binds debugger page-shell creation to the debug module.
Parameters
| Parameter | Type | Description |
|---|---|---|
$module | yii\ | Debug module read for the page title and the Configuration panel at call time. |
bare()
Section titled “bare() ”public function bare(string $theme): yii\debug\widgets\shell\ShellContextReturns the shell that echoes raw content without the brand bar or sidebar.
Parameters
| Parameter | Type | Description |
|---|---|---|
$theme | string | Resolved light/dark theme. |
Returns
yii\debug\widgets\shell\ShellContext: Bare shell.
forSnapshot()
Section titled “forSnapshot() ”public function forSnapshot(string $mode, string $theme, array<string, PHPForge\Debug\Storage\RequestSummary> $manifest, string|null $activeTag, PHPForge\Debug\Storage\RequestSummary|null $summary, PHPForge\Debug\View\Sidebar\SidebarView $sidebar): yii\debug\widgets\shell\ShellContextReturns the shell of an index, view, or standalone page.
The brand bar reads the Yii and PHP versions the Configuration panel captured, falling back to the running ones, and links the Configuration chip to the focused capture, or to the newest one when no capture is focused.
Parameters
| Parameter | Type | Description |
|---|---|---|
$mode | string | One of the ShellContext mode constants. |
$theme | string | Resolved light/dark theme. |
$manifest | array<string, | Manifest entries indexed by tag, newest first. |
$activeTag | string| | Tag focused by the page, or null on the index. |
$summary | PHPForge\ | Summary of the focused entry, or null on the index. |
$sidebar | PHPForge\ | Prepared sidebar payload. |
Returns
yii\debug\widgets\shell\ShellContext: Shell for the requested page.