PublicTemplateResponse
extends TemplateResponse
in package
Class PublicTemplateResponse
Tags
Table of Contents
Constants
- RENDER_AS_BASE = 'base'
- RENDER_AS_BLANK = ''
- RENDER_AS_ERROR = 'error'
- RENDER_AS_GUEST = 'guest'
- RENDER_AS_PUBLIC = 'public'
- RENDER_AS_USER = 'user'
Properties
- $appName : string
- app name
- $params : array<string|int, mixed>
- parameters
- $renderAs : string
- rendering type (admin, user, blank)
- $templateName : string
- name of the template
- $footerVisible : mixed
- $headerActions : mixed
- $headerDetails : mixed
- $headerTitle : mixed
Methods
- __construct() : mixed
- PublicTemplateResponse constructor.
- getActionCount() : int
- getApp() : string
- getFooterVisible() : bool
- getHeaderDetails() : string
- getHeaderTitle() : string
- getOtherActions() : array<string|int, IMenuAction>
- getParams() : array<string|int, mixed>
- Used for accessing the set parameters
- getPrimaryAction() : IMenuAction
- getRenderAs() : string
- Returns the set renderAs
- getTemplateName() : string
- Used for accessing the name of the set template
- render() : string
- Returns the rendered html
- renderAs() : TemplateResponse
- Sets the template page
- setFooterVisible() : mixed
- setHeaderActions() : mixed
- setHeaderDetails() : mixed
- setHeaderTitle() : mixed
- setParams() : TemplateResponse
- Sets template parameters
Constants
RENDER_AS_BASE
public
mixed
RENDER_AS_BASE
= 'base'
Tags
RENDER_AS_BLANK
public
mixed
RENDER_AS_BLANK
= ''
Tags
RENDER_AS_ERROR
public
mixed
RENDER_AS_ERROR
= 'error'
Tags
RENDER_AS_GUEST
public
mixed
RENDER_AS_GUEST
= 'guest'
Tags
RENDER_AS_PUBLIC
public
mixed
RENDER_AS_PUBLIC
= 'public'
Tags
RENDER_AS_USER
public
mixed
RENDER_AS_USER
= 'user'
Tags
Properties
$appName
app name
protected
string
$appName
$params
parameters
protected
array<string|int, mixed>
$params
$renderAs
rendering type (admin, user, blank)
protected
string
$renderAs
$templateName
name of the template
protected
string
$templateName
$footerVisible
private
mixed
$footerVisible
= true
$headerActions
private
mixed
$headerActions
= []
$headerDetails
private
mixed
$headerDetails
= ''
$headerTitle
private
mixed
$headerTitle
= ''
Methods
__construct()
PublicTemplateResponse constructor.
public
__construct(string $appName, string $templateName[, array<string|int, mixed> $params = [] ][, S $status = Http::STATUS_OK ][, H $headers = [] ]) : mixed
Parameters
- $appName : string
- $templateName : string
- $params : array<string|int, mixed> = []
- $status : S = Http::STATUS_OK
- $headers : H = []
Tags
getActionCount()
public
getActionCount() : int
Tags
Return values
intgetApp()
public
getApp() : string
Tags
Return values
string —the app id of the used template
getFooterVisible()
public
getFooterVisible() : bool
Tags
Return values
boolgetHeaderDetails()
public
getHeaderDetails() : string
Tags
Return values
stringgetHeaderTitle()
public
getHeaderTitle() : string
Tags
Return values
stringgetOtherActions()
public
getOtherActions() : array<string|int, IMenuAction>
Tags
Return values
array<string|int, IMenuAction>getParams()
Used for accessing the set parameters
public
getParams() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —the params
getPrimaryAction()
public
getPrimaryAction() : IMenuAction
Tags
Return values
IMenuActiongetRenderAs()
Returns the set renderAs
public
getRenderAs() : string
Tags
Return values
string —the renderAs value
getTemplateName()
Used for accessing the name of the set template
public
getTemplateName() : string
Tags
Return values
string —the name of the used template
render()
Returns the rendered html
public
render() : string
Tags
Return values
stringrenderAs()
Sets the template page
public
renderAs(string $renderAs) : TemplateResponse
Parameters
- $renderAs : string
-
admin, user or blank. Admin also prints the admin settings header and footer, user renders the normal normal page including footer and header and blank just renders the plain template
Tags
Return values
TemplateResponse —Reference to this object
setFooterVisible()
public
setFooterVisible([bool $visible = false ]) : mixed
Parameters
- $visible : bool = false
Tags
setHeaderActions()
public
setHeaderActions(array<string|int, mixed> $actions) : mixed
Parameters
- $actions : array<string|int, mixed>
Tags
setHeaderDetails()
public
setHeaderDetails(string $details) : mixed
Parameters
- $details : string
Tags
setHeaderTitle()
public
setHeaderTitle(string $title) : mixed
Parameters
- $title : string
Tags
setParams()
Sets template parameters
public
setParams(array<string|int, mixed> $params) : TemplateResponse
Parameters
- $params : array<string|int, mixed>
-
an array with key => value structure which sets template variables
Tags
Return values
TemplateResponse —Reference to this object