class TemplateFile (View source)

Properties

protected BlockType $parentObject

Stores the parent object of this template file

protected string $filename

Stores the file name

protected string $name

Stores the name of this template file

Methods

__construct(BlockType $parentObject, string $filename)

Initializes this TemplateFile instance

BlockType
getTemplateFileParentObject()

Returns the parent object of this template file

string
getTemplateFileFilename()

Returns the file name

string
getTemplateFileName()

Returns the name of this template file

string
getTemplateFileDisplayName(string $format = 'html')

Returns the display name for this template file (localized and escaped accordingly to $format)

string
__toString()

Returns the file name (implemented for backward compatibility with previuos BlockType->getBlockTypeCustomTemplates / BlockType->getBlockTypeComposerTemplates

static TemplateFile[]
sortTemplateFileList(TemplateFile[] $list)

Sorts a list of TemplateFile instances

static int
sortTemplateFileListSorter(TemplateFile $a, TemplateFile $b)

Callable function used by sortTemplateFileList.

Details

__construct(BlockType $parentObject, string $filename)

Initializes this TemplateFile instance

Parameters

BlockType $parentObject

The parent object of this template file

string $filename

The file name

BlockType getTemplateFileParentObject()

Returns the parent object of this template file

Return Value

BlockType

string getTemplateFileFilename()

Returns the file name

Return Value

string

string getTemplateFileName()

Returns the name of this template file

Return Value

string

string getTemplateFileDisplayName(string $format = 'html')

Returns the display name for this template file (localized and escaped accordingly to $format)

Parameters

string $format

= 'html' Escape the result in html format (if $format is 'html'). If $format is 'text' or any other value, the display name won't be escaped.

Return Value

string

string __toString()

Returns the file name (implemented for backward compatibility with previuos BlockType->getBlockTypeCustomTemplates / BlockType->getBlockTypeComposerTemplates

Return Value

string

static TemplateFile[] sortTemplateFileList(TemplateFile[] $list)

Sorts a list of TemplateFile instances

Parameters

TemplateFile[] $list

The list of TemplateFile instances to be sorted

Return Value

TemplateFile[]

static protected int sortTemplateFileListSorter(TemplateFile $a, TemplateFile $b)

Callable function used by sortTemplateFileList.

Parameters

TemplateFile $a
TemplateFile $b

Return Value

int