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 `lang` in the <html> tag. |
|
|
| null|string | $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. |
|
|
| 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. |
|
|
| null|int | $page | Which page of content are we on? |
|
|
| null|bool | $hasNextPage | Is there a next 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. |
|
|
| array | $preloads | An array of preloaded assets. |
|
|
| protected Factory | $view |
|
||
| protected array | $forumApiDocument |
|
||
| protected ServerRequestInterface | $request |
|
Methods
__construct( Factory $view, array $forumApiDocument, ServerRequestInterface $request)
No description
static
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 191
string
render()
at
line 218
protected string
makeTitle()
at
line 242
protected array
makePreloads()
at
line 258
protected string
makeHead()
at
line 289
protected string
makeJs()
at
line 299
protected string
makeFoot()
at
line 307
array
getForumApiDocument()
at
line 315
setForumApiDocument(array $forumApiDocument)
at
line 320
static
setPageParam(string $url, int|null $page)
at
line 332
static protected
setQueryParam(string $url, string $key, string|null $value)
Set or override a query param on a string URL to a particular value.