Located in file /wire/core/TemplateFile.php
Click any linked item for full usage details and examples. Hookable methods are indicated with the icon. In addition to those shown below, the Template
class also inherits all the methods and properties of: WireData and Wire.
Common
Name | Return | Summary | |
---|---|---|---|
Template | array | Optional file name(s) used for append. | |
Template Template Template | int | Clear out all pending output buffers | |
Template | string | Current file being rendered (whether primary, prepend, append). | |
Template | string | Primary file to render. | |
Template Template Template | mixed | Get a set property from the template file, typically to check if a template has access to a given variable | |
Template Template Template | array | Get an array of all variables accessible (locally scoped) to the PHP template file | |
Template Template Template | array | Get the current render stack | |
Template Template Template | $this | This method can be called by any template file to stop further render inclusions Can also be used as property: Template | |
Template | array | Optional file name(s) used for prepend. | |
Template Template Template | string | Render the template: execute it and return its output | |
Template Template Template | this WireData | Set a property | |
Template Template Template | bool | Set a file to append to the template file at render time | |
Template Template Template | (nothing) | Set the directory to temporarily change to during rendering | |
Template Template Template | bool | Sets the template file name, replacing whatever was set in the constructor | |
Template Template Template | bool | Set a file to prepend to the template file at render time | |
Template Template Template | (nothing) | Call this with boolean false to disable exceptions when file doesn’t exist | |
Template Template Template | (nothing) | Set whether rendered output should have leading/trailing whitespace trimmed | |
Template | bool | Whether or not leading/trailing whitespace is trimmed from output (3.0.154+). |
For hooks
These methods are only useful for hooking and should not be called directly.
Name | Return | Summary | |
---|---|---|---|
Template Template Template | bool | Called when render of specific file failed with Exception |
Additional methods and properties
In addition to the methods and properties above, Template
API reference based on ProcessWire core version 3.0.244