Nextcloud PHP API (master)

ITemplateManager

Tags
since
21.0.0

Table of Contents

Methods

createFromTemplate()  : array<string|int, mixed>
getTemplatePath()  : string
hasTemplateDirectory()  : bool
initializeTemplateDirectory()  : string
listCreators()  : array<string|int, mixed>
Get a list of available file creators
listTemplates()  : array<int, Template>}>
Get a list of available file creators and their offered templates
registerTemplateFileCreator()  : void
Register a template type support
setTemplatePath()  : void

Methods

createFromTemplate()

public createFromTemplate(string $filePath[, string $templateId = '' ][, string $templateType = 'user' ][, array<string|int, mixed> $templateFields = [] ]) : array<string|int, mixed>
Parameters
$filePath : string
$templateId : string = ''
$templateType : string = 'user'
$templateFields : array<string|int, mixed> = []

Since 30.0.0

Tags
throws
GenericFileException
since
21.0.0
Return values
array<string|int, mixed>

getTemplatePath()

public getTemplatePath() : string
Tags
since
21.0.0
Return values
string

hasTemplateDirectory()

public hasTemplateDirectory() : bool
Tags
since
21.0.0
Return values
bool

initializeTemplateDirectory()

public initializeTemplateDirectory([string|null $path = null ][, string|null $userId = null ][, mixed $copyTemplates = true ]) : string
Parameters
$path : string|null = null
$userId : string|null = null
$copyTemplates : mixed = true
Tags
since
21.0.0
Return values
string

listCreators()

Get a list of available file creators

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

listTemplates()

Get a list of available file creators and their offered templates

public listTemplates() : array<int, Template>}>
Tags
since
21.0.0
Return values
array<int, Template>}>

registerTemplateFileCreator()

Register a template type support

public registerTemplateFileCreator(callable(): TemplateFileCreator $callback) : void
Parameters
$callback : callable(): TemplateFileCreator

A callback which returns the TemplateFileCreator instance to register

Tags
since
21.0.0

setTemplatePath()

public setTemplatePath(string $path) : void
Parameters
$path : string
Tags
since
21.0.0

        
On this page

Search results