API / Minn\Theme / EmbedRenderer

EmbedRenderer final readonly class

Minn\Theme\EmbedRenderer · public/minn/src/Minn/Theme/EmbedRenderer.php · 33 lines

A post's embed page (its /embed/ address, or ?embed= on it), the card another site's iframe shows, as the reference prints it: the main query stood with the embed asked for, then the embed template (the theme's own embed-{type}.php or embed.php, else the engine's theme-compat one) through template_include, with embed_head, embed_content, embed_content_meta and embed_footer. An address that embeds nothing gets the 404 card.

Constants and properties

privatereadonly Minn\Theme\MainQueryBridge $bridge

Promoted from the constructor.

Public

new__construct(Minn\Theme\MainQueryBridge $bridge)#
staticasked(Minn\Http\Request $request, Minn\Front\Resolution $resolution): bool#

Whether a request for this resolution asks for its embed page.

methodrender(Minn\Front\Resolution $resolution, Closure $bodyClasses): Minn\Http\Response#

The embed page, under the status the request's main query settled on; the body classes the theme's page would carry (the Minn bar's aside), read once its main query stands.

$bodyClassesClosure(): list<string>