Nextcloud PHP API (master)

ITemplateManager

Tags
since
32.0.0

Table of Contents

Methods

getTemplate()  : ITemplate
printErrorPage()  : never
Print a fatal error page and terminates the script
printExceptionErrorPage()  : never
Print error page using Exception details
printGuestPage()  : void
Shortcut to print a simple page for guests

Methods

getTemplate()

public getTemplate(string $app, string $name[, TemplateResponse::RENDER_AS_* $renderAs = TemplateResponse::RENDER_AS_BLANK ][, bool $registerCall = true ]) : ITemplate
Parameters
$app : string
$name : string
$renderAs : TemplateResponse::RENDER_AS_* = TemplateResponse::RENDER_AS_BLANK
$registerCall : bool = true
Tags
throws
TemplateNotFoundException

if the template cannot be found

since
32.0.0
Return values
ITemplate

printErrorPage()

Print a fatal error page and terminates the script

public printErrorPage(string $error_msg[, string $hint = '' ][, int $statusCode = 500 ]) : never
Parameters
$error_msg : string

The error message to show

$hint : string = ''

An optional hint message - needs to be properly escape

$statusCode : int = 500
Tags
since
32.0.0
Return values
never

printExceptionErrorPage()

Print error page using Exception details

public printExceptionErrorPage(Throwable $exception[, int $statusCode = 503 ]) : never
Parameters
$exception : Throwable
$statusCode : int = 503
Tags
since
32.0.0
Return values
never

printGuestPage()

Shortcut to print a simple page for guests

public printGuestPage(string $application, string $name[, array<string|int, mixed> $parameters = [] ]) : void
Parameters
$application : string
$name : string
$parameters : array<string|int, mixed> = []
Tags
since
32.0.0

        
On this page

Search results