BootPayload final readonly class
Minn\Admin\BootPayload · public/minn/src/Minn/Admin/BootPayload.php · 245 lines
The window.MINN boot payload, assembled from the engine: the keys app.js needs to boot and drive the wp/v2 surface, with capabilities from the engine's own model.
Constants and properties
| private | PLUGIN_KEYS_WITHHELD = array ( 0 => 'notices', ) | Boot keys the plugin computes that point the app at wp-admin pages the engine does not serve. |
| private | readonly Minn\Content\Site $site | Promoted from the constructor. |
| private | readonly Minn\Front\Permalinks $permalinks | Promoted from the constructor. |
| private | readonly Minn\Auth\Capabilities $capabilities | Promoted from the constructor. |
| private | readonly Minn\Admin\App $app | Promoted from the constructor. |
| private | readonly string $engineVersion | Promoted from the constructor. |
| private | readonly Minn\Admin\Appearance $appearance | Promoted from the constructor. |
| private | readonly Minn\Admin\HiddenIntegrations $hidden | Promoted from the constructor. |
| private | readonly Minn\Content\SiteIcon $icon | Promoted from the constructor. |
| private | readonly bool $blockTheme | Promoted from the constructor. |
| private | readonly ?Minn\Admin\Translations $translations | Promoted from the constructor. |
Public
| new | __construct(Minn\Content\Site $site, Minn\Front\Permalinks $permalinks, Minn\Auth\Capabilities $capabilities, Minn\Admin\App $app, string $engineVersion, Minn\Admin\Appearance $appearance, Minn\Admin\HiddenIntegrations $hidden, Minn\Content\SiteIcon $icon, bool $blockTheme = false, ?Minn\Admin\Translations $translations = NULL)# | |
| method | siteName(): string# | The site's name, or Site when it has none. |
| method | build(Minn\Auth\Authenticated $session): array# | The window.MINN payload the app boots from, for one signed-in session. |
Internals 7
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
| private | userSlice(Minn\Auth\Authenticated $session, string $role): array# | @return array<string, mixed> | |||
| private | siteSlice(): array# | @return array<string, mixed> | |||
| private | commerce(?array $plugin): bool# | Whether WooCommerce is running: the plugin's own answer when it gave one, else whether the runtime loaded the class.
| |||
| private | caps(int $userId, ?array $plugin): array# | What the app may show, each key a capability the reference gates the same view on. The commerce caps mirror the plugin's own conditions: WC loaded, the WC capability, and for coupons the store having them enabled. @return array<string, bool> | |||
| private | pluginPayload(): ?array# | What Minn Admin's own boot_payload() computes when the plugin runs as code on the runtime, so the app boots with the same keys on both stacks (connectors, discussion defaults, roles, post formats, the adapter flags). Engine-owned keys win; the withheld ones would send the app to a wp-admin page the engine does not have. | |||
| private | standHomeQuery(): void# | The reference serves the app shell from the home query, so the global post is the newest post while the payload is built; the comments feature check reads it through the comments_open filter (a site that closes comments on old posts reports the feature off when its newest post is old). | |||
| private | adapterSlices(): array# | What Minn Admin's own adapters contribute when the plugin runs as code on the runtime: plugin surfaces (Tools), editor panels, design sources, editor commands, block forms. Absent, the app's fallbacks apply. |
Nothing matches.