AdminLayoutHttpControllerResponse
extends HttpControllerResponse
in package
Class AdminLayoutHttpControllerResponse
This class will be used for rendering the new Admin pages which must be explicitly written in templates. These templates can extend any of the existing admin layouts by themselves.
Child controllers can you the "init" method to initialize their dependencies
Tags
Table of Contents
- $assets : AssetCollectionInterface
- Page Assets
- $contentNavigation : ContentNavigationCollectionInterface
- Content Sub Navigation
- $contentView : ContentView
- ContentView instance.
- $data : KeyValueCollection
- Template data.
- $httpBody : string
- $httpHeadersArray : array<string|int, mixed>
- $template : string
- Template Path
- $title : string
- Page Title
- __construct() : mixed
- AdminLayoutHttpViewController constructor.
- getBody() : string
- Returns the response body string.
- getHeaders() : array<string|int, mixed>
- Returns the response headers array.
- _getTranslations() : array<string|int, mixed>
- Get the default and assets translations.
- _render() : mixed
- Render the provided template.
- _setInitialMessages() : mixed
- Set initial messages for new admin layout.
Properties
$assets
Page Assets
protected
AssetCollectionInterface
$assets
Provide paths or filenames to JavaScript, CSS or PHP Translation files.
$contentNavigation
Content Sub Navigation
protected
ContentNavigationCollectionInterface
$contentNavigation
The sub navigation will be displayed under the header and can redirect to similar pages.
$contentView
ContentView instance.
protected
ContentView
$contentView
Used for parsing the Smarty templates.
$data
Template data.
protected
KeyValueCollection
$data
$httpBody
protected
string
$httpBody
$httpHeadersArray
protected
array<string|int, mixed>
$httpHeadersArray
= []
$template
Template Path
protected
string
$template
$title
Page Title
protected
string
$title
Methods
__construct()
AdminLayoutHttpViewController constructor.
public
__construct(NonEmptyStringType $title, ExistingFile $template[, KeyValueCollection|null $data = null ][, AssetCollectionInterface|null $assets = null ][, ContentNavigationCollectionInterface|null $contentNavigation = null ][, ContentView|null $contentView = null ]) : mixed
Parameters
- $title : NonEmptyStringType
-
Page title.
- $template : ExistingFile
-
Template absolute path.
- $data : KeyValueCollection|null = null
-
A key-value collection containing the data to be used by the template.
- $assets : AssetCollectionInterface|null = null
-
Page assets (js, css, translations etc).
- $contentNavigation : ContentNavigationCollectionInterface|null = null
-
Sub content navigation (key-value collection).
- $contentView : ContentView|null = null
-
Provide a custom content view class if needed.
Return values
mixed —getBody()
Returns the response body string.
public
getBody() : string
Return values
string —getHeaders()
Returns the response headers array.
public
getHeaders() : array<string|int, mixed>
Return values
array<string|int, mixed> —_getTranslations()
Get the default and assets translations.
protected
_getTranslations() : array<string|int, mixed>
Hint: Override this method to fetch different default translations.
Return values
array<string|int, mixed> —_render()
Render the provided template.
protected
_render() : mixed
Hint: Override this method to change the rendering algorithm.
Tags
Return values
mixed —_setInitialMessages()
Set initial messages for new admin layout.
protected
_setInitialMessages() : mixed