interface template
Methods
| template |
clear_cache()
Clear the cache |
|
| template |
set_filenames(array $filename_array)
Sets the template filenames for handles. |
|
| array |
get_user_style()
Get the style tree of the style preferred by the current user |
|
| template |
set_style(array $style_directories = array('styles'))
Set style location based on (current) user's chosen style. |
|
| template |
set_custom_style(string|array $names, string|array $paths)
Set custom style location (able to use directory outside of phpBB). |
|
| template |
destroy()
Clears all variables and blocks assigned to this template. |
|
| template |
destroy_block_vars(string $blockname)
Reset/empty complete block |
|
| template |
display(string $handle)
Display a template for provided handle. |
|
| template|string |
assign_display(string $handle, string $template_var = '', bool $return_content = true)
Display the handle and assign the output to a template variable or return the compiled result. |
|
| template |
assign_vars(array $vararray)
Assign key variable pairs from an array |
|
| template |
assign_var(string $varname, string $varval)
Assign a single scalar value to a single key. |
|
| template |
append_var(string $varname, string $varval)
Append text to the string value stored in a key. |
|
| template |
assign_block_vars(string $blockname, array $vararray)
Assign key variable pairs from an array to a specified block |
|
| template |
assign_block_vars_array(string $blockname, array $block_vars_array)
Assign key variable pairs from an array to a whole specified block loop |
|
| bool |
alter_block_array($blockname, array $vararray, $key = false, $mode = 'insert')
Change already assigned key variable pair (one-dimensional - single loop entry) |
|
| string |
get_source_file_for_handle(string $handle)
Get path to template for handle (required for BBCode parser) |
Details
at line 24
public template
clear_cache()
Clear the cache
at line 32
public template
set_filenames(array $filename_array)
Sets the template filenames for handles.
at line 39
public array
get_user_style()
Get the style tree of the style preferred by the current user
at line 49
public template
set_style(array $style_directories = array('styles'))
Set style location based on (current) user's chosen style.
at line 60
public template
set_custom_style(string|array $names, string|array $paths)
Set custom style location (able to use directory outside of phpBB).
Note: Templates are still compiled to phpBB's cache directory.
at line 67
public template
destroy()
Clears all variables and blocks assigned to this template.
at line 75
public template
destroy_block_vars(string $blockname)
Reset/empty complete block
at line 87
public template
display(string $handle)
Display a template for provided handle.
The template will be loaded and compiled, if necessary, first.
This function calls hooks.
at line 98
public template|string
assign_display(string $handle, string $template_var = '', bool $return_content = true)
Display the handle and assign the output to a template variable or return the compiled result.
at line 106
public template
assign_vars(array $vararray)
Assign key variable pairs from an array
at line 117
public template
assign_var(string $varname, string $varval)
Assign a single scalar value to a single key.
Value can be a string, an integer or a boolean.
at line 128
public template
append_var(string $varname, string $varval)
Append text to the string value stored in a key.
Text is appended using the string concatenation operator (.).
at line 136
public template
assign_block_vars(string $blockname, array $vararray)
Assign key variable pairs from an array to a specified block
at line 144
public template
assign_block_vars_array(string $blockname, array $block_vars_array)
Assign key variable pairs from an array to a whole specified block loop
at line 173
public bool
alter_block_array($blockname, array $vararray, $key = false, $mode = 'insert')
Change already assigned key variable pair (one-dimensional - single loop entry)
An example of how to use this function: {@example alterblockarray.php}
at line 181
public string
get_source_file_for_handle(string $handle)
Get path to template for handle (required for BBCode parser)