Nextcloud PHP API (stable19)

ACreateFromTemplate extends ACreateEmpty

Tags
since
18.0.0

Table of Contents

create()  : void
Add content when creating empty files
getExtension()  : string
Default file extension for the new file
getId()  : string
Unique id for the creator to filter templates
getMimetype()  : string
Mimetype of the resulting created file
getName()  : string
Descriptive name for the create action
getTemplates()  : \OCP\DirectEditing\ATemplate[]
List of available templates for the create from template action

Methods

create()

Add content when creating empty files

public create(File $file[, string $creatorId = null ][, string $templateId = null ]) : void
Parameters
$file : File
$creatorId : string = null
$templateId : string = null
Tags
since
18.0.0

getExtension()

Default file extension for the new file

public abstract getExtension() : string
Tags
since
18.0.0
Return values
string

getId()

Unique id for the creator to filter templates

public abstract getId() : string

e.g. document/spreadsheet/presentation

Tags
since
18.0.0
Return values
string

getMimetype()

Mimetype of the resulting created file

public abstract getMimetype() : string
Tags
since
18.0.0
Return values
string

getName()

Descriptive name for the create action

public abstract getName() : string

e.g Create a new document

Tags
since
18.0.0
Return values
string

getTemplates()

List of available templates for the create from template action

public abstract getTemplates() : \OCP\DirectEditing\ATemplate[]
Tags
since
18.0.0
Return values
\OCP\DirectEditing\ATemplate[]

Search results