TemplateFile::setFilename()

Sets the template file name, replacing whatever was set in the constructor

Usage

$bool = $templateFile->setFilename(string $filename);

Arguments

NameType(s)Description
$filenamestring

Full path and filename to the PHP template file

Return value

bool

true on success, false if file doesn't exist

Exceptions

Method can throw exceptions on error:

  • WireException - if file doesn't exist (unless throwExceptions is disabled)


TemplateFile methods and properties

API reference based on ProcessWire core version 3.0.251