AdminPage
Wraps the shell into a full HTML document: the design tokens and bundle, the client runtime and Alpine (served by the panel itself, no build step), the declared locale as `lang`. Owns no surface markup — that is the components' — only the document around them: the panel's own stylesheet ({@see self::css()}: the document painted, a base layer for the raw HTML a section emits, the panel's classes) and the two scripts that keep the viewer's panel preferences: one at the top of `<body>` that applies the stored theme before anything paints, one at the end that stores what the Settings section's `[data-pref]` controls say (`localStorage`, key {@see self::PREFS_KEY}) and applies it — theme on `<html data-theme>`, density on `.mui-shell[data-density]`, the language override by navigating with `?lang=` and keeping it on every in-panel link. Nothing of it is stored on the server; a delegated listener, no per-instance state (greenhouse decisions/0204). **One runtime per page** (greenhouse decisions/0211). The page hand-writes no runtime `<script>` tag any more: given the boot the controller issued and what the compile declared, `LiveBoot::html()` emits — in `<head>`, after the panel's own stylesheets — every declared stylesheet, the boot payload, `milpa-live.js`, `milpa-live-remote.js`, every declared plugin module in declared order, and Alpine LAST, each `defer`, each URL once. The three seed tags (`#milpa-live-signals`, `#milpa-live-persist`, `#milpa-live-computed`) are written here and only here, from the {@see LiveSeeds} the shell merged, so the page never has two places that could disagree about what the store starts with. A document rendered WITHOUT a boot — the 404 of an unknown section, the 500 of a conflict — carries no runtime at all: there is no live component on it to serve.
AdminPage::__construct()
public function __construct(Milpa\Admin\AdminSettings $settings, Milpa\Admin\I18n\Catalog $catalog):Parameters
| Name | Type | Description |
|---|---|---|
| $settings | Milpa\Admin\AdminSettings | |
| $catalog | Milpa\Admin\I18n\Catalog |
AdminPage::withCatalog()
public function withCatalog(Milpa\Admin\I18n\Catalog $catalog): selfThe same document answering in another catalog — a request's `?lang=` — with everything else shared.
Parameters
| Name | Type | Description |
|---|---|---|
| $catalog | Milpa\Admin\I18n\Catalog |
AdminPage::render()
public function render(string $shellHtml, string $title = '', ?Milpa\Live\Http\LiveBoot $boot = null, ?Milpa\Live\ValueObjects\ClientAssets $assets = null, ?Milpa\Admin\View\LiveSeeds $seeds = null): stringThe document around a rendered shell.
Parameters
| Name | Type | Description |
|---|---|---|
| $shellHtml | string | |
| $title | string | |
| $boot | (LiveBoot | null) | the page's live boot — the endpoint, its session and its CSRF token; null for a document with no live component on it (an error page), which then emits no runtime |
| $assets | (ClientAssets | null) | what the compile declared — the stylesheets and modules the components need |
| $seeds | (LiveSeeds | null) | the merged signal seeds; the three tags are emitted whenever there is a boot |
AdminPage::error()
public function error(int $status, string $message): stringA plain error document in the same skin — the 404 of an unknown section, the 500 of a conflict.
Parameters
| Name | Type | Description |
|---|---|---|
| $status | int | |
| $message | string |
AdminPage::runtimeUrls()
public function runtimeUrls(): arrayWhere the panel serves each runtime file — its own asset route, so no build step and no CDN ({@see \Milpa\Admin\Controllers\AssetsController} reads them out of `milpa/live-web`).