class Document implements Renderable
A view which renders a HTML skeleton for Flarum's frontend app.
Properties
| string|null | $title | The title of the document, displayed in the <title> tag. |
|
|
| string|null | $language | The language of the document, displayed as the value of the attribute `lang` in the <html> tag. |
|
|
| string|null | $direction | The text direction of the document, displayed as the value of the attribute `dir` 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. |
|
|
| Renderable|null | $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>. |
|
|
| string|null | $canonicalUrl | The canonical URL for this page. |
|
|
| int|null | $page | Which page of content are we on? |
|
|
| bool|null | $hasNextPage | Is there a next page? |
|
|
| array | $head | An array of strings to append to the page's <head>. |
|
|
| string | $criticalCss | Inline critical CSS emitted before the async stylesheet links. |
|
|
| 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. |
|
|
| array | $preloads | An array of preloaded assets. |
|
|
| array<string,string|callable|array> | $extraAttributes | Document extra attributes. |
|
|
| protected VersionerInterface | $versioner | We need the versioner to get the revisions of split chunks. |
|
Methods
__construct(Factory $view, array $forumApiDocument, ServerRequestInterface $request, TitleDriverInterface $titleDriver, Config $config, Factory $filesystem)
No description
static string
setQueryParam(string $url, string $key, string|null $value)
Set or override a query param on a string URL to a particular value.
Details
at
line 158
__construct(Factory $view, array $forumApiDocument, ServerRequestInterface $request, TitleDriverInterface $titleDriver, Config $config, Factory $filesystem)
at
line 171
string
render()
at
line 178
protected View
makeView()
at
line 197
protected string
makeTitle()
at
line 202
protected View|null
makeLayout()
at
line 211
protected View
makeContent()
at
line 216
protected array
makePreloads()
at
line 229
protected array
makeExtraClasses()
at
line 246
protected string
makeExtraAttributes()
at
line 273
protected string
makeHead()
at
line 307
protected string
makeJs()
at
line 314
protected string
makeFoot()
at
line 319
array
getForumApiDocument()
at
line 324
void
setForumApiDocument(array $forumApiDocument)
at
line 329
static string
setPageParam(string $url, int|null $page)
at
line 341
static protected string
setQueryParam(string $url, string $key, string|null $value)
Set or override a query param on a string URL to a particular value.