RenderController final readonly class
Minn\Admin\RenderController · public/minn/src/Minn/Admin/RenderController.php · 52 lines
The editor's island previews: block markup rendered by the same renderer the public site uses, with the stylesheets that site loads (the engine's block stylesheet, the theme's, and the theme.json rules) so a preview looks like the page will.
Constants and properties
| private | readonly Minn\Db $db | Promoted from the constructor. |
| private | readonly Minn\Content\Site $site | Promoted from the constructor. |
| private | readonly Minn\Content\Posts $posts | Promoted from the constructor. |
| private | readonly Minn\Front\Permalinks $permalinks | Promoted from the constructor. |
| private | readonly Minn\Rest\Caller $caller | Promoted from the constructor. |
| private | readonly string $themesDir | Promoted from the constructor. |
Public
| new | __construct(Minn\Db $db, Minn\Content\Site $site, Minn\Content\Posts $posts, Minn\Front\Permalinks $permalinks, Minn\Rest\Caller $caller, string $themesDir)# | |
| method | render(Minn\Http\Request $request): Minn\Http\ResponsePOST /minn-admin/v1/render-blocks (floor edit_posts)# | Renders blocks for the editor's preview. |
| method | editorStyles(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/editor-styles (floor edit_posts)# | The stylesheets previews are scoped under: the engine's own, the theme's, and theme.json inline. |
Internals 1
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
| private | styles(): array# | @return array{urls: list<string>, inline: string} |
Nothing matches.