Nextcloud PHP API (master)

PublicTemplateResponse extends TemplateResponse
in package

Class PublicTemplateResponse

Tags
since
14.0.0
template

H of array<string, mixed>

template

S of int

template-extends

TemplateResponse<int, array<string, mixed>>

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_ERROR

public mixed RENDER_AS_ERROR = 'error'
Tags
since
20.0.0

RENDER_AS_GUEST

public mixed RENDER_AS_GUEST = 'guest'
Tags
since
20.0.0

RENDER_AS_PUBLIC

public mixed RENDER_AS_PUBLIC = 'public'
Tags
since
20.0.0

Properties

$renderAs

rendering type (admin, user, blank)

protected string $renderAs

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
since
14.0.0

getApp()

public getApp() : string
Tags
since
25.0.0
Return values
string

the app id of the used template

getParams()

Used for accessing the set parameters

public getParams() : array<string|int, mixed>
Tags
since
6.0.0
Return values
array<string|int, mixed>

the params

getRenderAs()

Returns the set renderAs

public getRenderAs() : string
Tags
since
6.0.0
Return values
string

the renderAs value

getTemplateName()

Used for accessing the name of the set template

public getTemplateName() : string
Tags
since
6.0.0
Return values
string

the name of the used template

render()

Returns the rendered html

public render() : string
Tags
since
14.0.0
Return values
string

renderAs()

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
since
6.0.0
  • return value was added in 7.0.0
Return values
TemplateResponse

Reference to this object

setFooterVisible()

public setFooterVisible([bool $visible = false ]) : mixed
Parameters
$visible : bool = false
Tags
since
14.0.0

setHeaderActions()

public setHeaderActions(array<string|int, mixed> $actions) : mixed
Parameters
$actions : array<string|int, mixed>
Tags
since
14.0.0
throws
InvalidArgumentException

setHeaderDetails()

public setHeaderDetails(string $details) : mixed
Parameters
$details : string
Tags
since
14.0.0

setHeaderTitle()

public setHeaderTitle(string $title) : mixed
Parameters
$title : string
Tags
since
14.0.0

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
since
6.0.0
  • return value was added in 7.0.0
Return values
TemplateResponse

Reference to this object


        
On this page

Search results