ITemplateManager
in
Tags
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<string|int, mixed>
- 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
Return values
array<string|int, mixed>getTemplatePath()
public
getTemplatePath() : string
Tags
Return values
stringhasTemplateDirectory()
public
hasTemplateDirectory() : bool
Tags
Return values
boolinitializeTemplateDirectory()
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
Return values
stringlistCreators()
Get a list of available file creators
public
listCreators() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>listTemplates()
Get a list of available file creators and their offered templates
public
listTemplates() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>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
setTemplatePath()
public
setTemplatePath(string $path) : void
Parameters
- $path : string