Documentation

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
category

System

extends

HttpControllerResponse

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

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

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
throws
InvalidArgumentException
throws
UnexpectedValueException
Return values
mixed

Search results