Nextcloud PHP API (master)

ACreateFromTemplate extends ACreateEmpty
in package

AbstractYes
Tags
since
18.0.0

Table of Contents

Methods

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()  : array<string|int, ATemplate>
List of available templates for the create from template action

Methods

create()

Add content when creating empty files

public create(File $file[, string|null $creatorId = null ][, string|null $templateId = null ]) : void
Parameters
$file : File
$creatorId : string|null = null
$templateId : string|null = 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() : array<string|int, ATemplate>
Tags
since
18.0.0
Return values
array<string|int, ATemplate>

        
On this page

Search results