AppController final readonly class
Minn\Admin\AppController · public/minn/src/Minn/Admin/AppController.php · 149 lines
Serves Minn Admin from the engine: the path-routed shell (every sub-path renders the same page) and the app's assets. The nonce refresh app.js asks admin-ajax.php for is the reference's own rest-nonce action (Runtime\AjaxController).
Constants and properties
| private | readonly Minn\Admin\App $app | Promoted from the constructor. |
| private | readonly Minn\Admin\BootPayload $payload | Promoted from the constructor. |
| private | readonly Minn\Auth\Authenticator $authenticator | Promoted from the constructor. |
| private | readonly Minn\Auth\Capabilities $capabilities | Promoted from the constructor. |
| private | readonly Minn\Front\Permalinks $permalinks | Promoted from the constructor. |
| private | readonly string $engineVersion | Promoted from the constructor. |
| private | readonly Minn\Content\SiteIcon $icon | Promoted from the constructor. |
| private | readonly bool $off | the site has deactivated the Minn Admin plugin: the engine runs without an admin Promoted from the constructor. |
Public
| new | __construct(Minn\Admin\App $app, Minn\Admin\BootPayload $payload, Minn\Auth\Authenticator $authenticator, Minn\Auth\Capabilities $capabilities, Minn\Front\Permalinks $permalinks, string $engineVersion, Minn\Content\SiteIcon $icon, bool $off = false)# | |
| method | shell(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin (public)GET /minn-admin/{rest*} (public)# | Requires a signed-in user who can edit content; otherwise the login form. |
| method | asset(Minn\Http\Request $request, string $path): Minn\Http\ResponseGET /minn/admin/assets/{path*} (public)# | One file of the app bundle, with its content type and caching headers. |
Internals 3
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
| private | offPage(): string# | The engine without an admin: the site keeps serving; the command that brings the admin back is named. |
| private | favicon(): string# | The tab's icon, chosen as Minn Admin's own shell chooses it: the site icon when there is one, else a brand mark a theme or plugin offers on minn_admin_favicon, else Minn's "m" in the viewer's accent (Minn Admin's own drawing when it runs as code, its default accent if not). Without one the browser asks for /favicon.ico. |
| private | render(array $boot): string# | The shell reproduces the structure of Minn Admin's own template.php (an MIT file): pre-paint theme, inline window.MINN, mount point, app.js. |
Nothing matches.