AdminErrorPresenter
Corex\Admin\Errors\AdminErrorPresenter · class · Core layer
Turns an {@see AdminError} into the branded document a refused person is shown (spec 083). These refusals happen before the admin shell exists — WordPress ends the request at the menu gate, long before a screen’s callback or its stylesheet — so the response has to be entirely self-contained. Spec 079 wrote that document by hand in six places across corex-config, and they drifted; the wording, the status and the way back all come from here now. There is no in-shell renderer here on purpose. A screen that is already rendering has AdminPage::state('error', …) and, in React, CorexErrorState — adding a third with no caller would be an abstraction kept alive by its own existence.
Public API
Section titled “Public API”__construct(StandalonePage $page)
Section titled “__construct(StandalonePage $page)”make(AdminErrorKind $kind, ?int $status): AdminError
Section titled “make(AdminErrorKind $kind, ?int $status): AdminError”Build the standard error for a kind, with CoreX’s copy and a way forward.
document(AdminError $error): string
Section titled “document(AdminError $error): string”A complete <!DOCTYPE html> response, for refusals that happen before the admin shell loads.