Property | Type | Description | |
---|---|---|---|
$api | |||
$app | |||
$assets | |||
$content | string | The SEO content of the page, displayed within the layout in | |
$css | Flarum\Asset\CompilerInterface | ||
$description | null | string | The description of the document, displayed in a tag. | |
$document | null | array | object | An API response to be preloaded into the page. | |
$foot | array | An array of strings to prepend before the page's |
.
Method | Description | |
---|---|---|
__construct ( string $layout, |
||
addFootString ( string $string ) | Add a string to be prepended before the page's . | |
addHeadString ( string $string, null | string $name = null ) | Add a string to be appended to the page's . | |
getCss ( ) : Flarum\Asset\CompilerInterface | ||
getJs ( ) : Flarum\Asset\CompilerInterface | ||
getLocaleCss ( ) : Flarum\Asset\CompilerInterface | ||
getLocaleJs ( ) : |
||
loadModule ( string $module ) | Add a JavaScript module to be imported before the app is booted. | |
render ( Psr\Http\Message\ServerRequestInterface $request ) : string | Get the string contents of the view. | |
setContent ( null | string $content ) | Set the SEO content of the page, to be displayed in | |
setDocument ( null | array | object $document ) | Set an API response to be preloaded into the page. This should be a JSON-API document. | |
setLayout ( string $layout ) | Set the name of the client layout view to display. | |
setTitle ( null | string $title ) |
The title of the document, to be displayed in the |
|
setVariable ( string $name, mixed $value ) | Set a variable to be preloaded into the app. |
Method | Description | |
---|---|---|
buildAssetUrls ( $baseUrl, $files ) | ||
buildContent ( ) | ||
buildCssUrls ( $baseUrl ) | ||
buildJsUrls ( $baseUrl ) | ||
buildLayout ( ) | ||
buildPayload ( Psr\Http\Message\ServerRequestInterface $request, $forum ) | ||
buildSession ( Psr\Http\Message\ServerRequestInterface $request ) : array | Get information about the current session. | |
buildTitle ( $forumTitle ) | ||
getForumDocument ( Psr\Http\Message\ServerRequestInterface $request ) : array | Get the result of an API request to show the forum. | |
getUserDocument ( Psr\Http\Message\ServerRequestInterface $request ) : array | Get the result of an API request to show the current user. |
Method | Description | |
---|---|---|
getDataFromDocument ( array $document ) : array | Get an array of data by merging the 'data' and 'included' keys of a JSON-API document. |
public __construct ( string $layout, |
||
$layout | string | |
$assets | ||
$api | ||
$view | Illuminate\View\Factory | |
$locales | ||
$userSerializer | ||
$app |
public addFootString ( string $string ) | ||
$string | string |
protected buildPayload ( Psr\Http\Message\ServerRequestInterface $request, $forum ) | ||
$request | Psr\Http\Message\ServerRequestInterface |
protected buildSession ( Psr\Http\Message\ServerRequestInterface $request ) : array | ||
$request | Psr\Http\Message\ServerRequestInterface | |
return | array |
public getCss ( ) : Flarum\Asset\CompilerInterface | ||
return | Flarum\Asset\CompilerInterface |
protected getForumDocument ( Psr\Http\Message\ServerRequestInterface $request ) : array | ||
$request | Psr\Http\Message\ServerRequestInterface | |
return | array |
public getJs ( ) : Flarum\Asset\CompilerInterface | ||
return | Flarum\Asset\CompilerInterface |
public getLocaleCss ( ) : Flarum\Asset\CompilerInterface | ||
return | Flarum\Asset\CompilerInterface |
protected getUserDocument ( Psr\Http\Message\ServerRequestInterface $request ) : array | ||
$request | Psr\Http\Message\ServerRequestInterface | |
return | array |
public loadModule ( string $module ) | ||
$module | string |
public setContent ( null | string $content ) | ||
$content | null | string |
public setVariable ( string $name, mixed $value ) | ||
$name | string | |
$value | mixed |
protected Application,Flarum\Foundation $app | ||
return |
protected string $content | ||
return | string |
protected CompilerInterface,Flarum\Asset $css | ||
return | Flarum\Asset\CompilerInterface |
protected array $foot | ||
return | array |
protected array $head | ||
return | array |
protected CompilerInterface,Flarum\Asset $js | ||
return | Flarum\Asset\CompilerInterface |
protected string $layout | ||
return | string |
protected CompilerInterface,Flarum\Asset $localeCss | ||
return | Flarum\Asset\CompilerInterface |
protected CompilerInterface,Flarum\Asset $localeJs | ||
return | Flarum\Asset\CompilerInterface |
protected LocaleManager,Flarum\Locale $locales | ||
return |
protected array $modules | ||
return | array |
protected AbstractSerializer,Flarum\Api\Serializer $userSerializer | ||
return |
protected array $variables | ||
return | array |