class Document implements Renderable

A view which renders a HTML skeleton for Flarum's frontend app.

Properties

null|string $title The title of the document, displayed in the <title> tag.
null|string $language The language of the document, displayed as the value of the attribute <code>lang</code> in the <html> tag.
null|string $direction The text direction of the document, displayed as the value of the attribute <code>dir</code> in the <html> tag.
string $appView The name of the frontend app view to display.
string $layoutView The name of the frontend layout view to display.
string $contentView The name of the frontend content view to display.
string|Renderable $content The SEO content of the page, displayed within the layout in <noscript> tags.
array $payload Other variables to preload into the Flarum JS.
array $meta An array of meta tags to append to the page's <head>.
null|string $canonicalUrl The canonical URL for this page.
array $head An array of strings to append to the page's <head>.
array $foot An array of strings to prepend before the page's </body>.
array $js An array of JavaScript URLs to load.
array $css An array of CSS URLs to load.
protected Factory $view
protected array $forumApiDocument
protected Request $request

Methods

__construct(Factory $view, array $forumApiDocument, ServerRequestInterface $request)

No description

string
render()

No description

View
makeView()

No description

string
makeTitle()

No description

View
makeLayout()

No description

View
makeContent()

No description

string
makeHead()

No description

string
makeJs()

No description

string
makeFoot()

No description

array
getForumApiDocument()

No description

setForumApiDocument(array $forumApiDocument)

No description

Details

__construct(Factory $view, array $forumApiDocument, ServerRequestInterface $request)

Parameters

Factory $view
array $forumApiDocument
ServerRequestInterface $request

string render()

Return Value

string

protected View makeView()

Return Value

View

protected string makeTitle()

Return Value

string

protected View makeLayout()

Return Value

View

protected View makeContent()

Return Value

View

protected string makeHead()

Return Value

string

protected string makeJs()

Return Value

string

protected string makeFoot()

Return Value

string

array getForumApiDocument()

Return Value

array

setForumApiDocument(array $forumApiDocument)

Parameters

array $forumApiDocument