Base¶
-
class
OC\Template\
Base
¶ Source: lib/private/Template/Base.php#35
Properties¶
Methods¶
-
public
OC\Template\Base::
__construct
($template, $requestToken, $l10n, $theme)¶ Source: Parameters: - $template (string)
- $requestToken (string)
- $l10n (
OCP\IL10N
) - $theme (
OCP\Defaults
)
-
protected
OC\Template\Base::
getAppTemplateDirs
($theme, $app, $serverRoot, $app_dir)¶ Source: Parameters: - $theme (string)
- $app (string)
- $serverRoot (string)
- $app_dir (string | bool)
Returns: string[]
-
protected
OC\Template\Base::
getCoreTemplateDirs
($theme, $serverRoot)¶ Source: Parameters: - $theme (string)
- $serverRoot (string)
Returns: string[]
-
public
OC\Template\Base::
assign
($key, $value)¶ - Assign variables
Source: Parameters: - $key (string) key
- $value (array | bool | int | string |
\Throwable
) value
Returns: bool This function assigns a variable. It can be accessed via $_[$key] in the template.
If the key existed before, it will be overwritten
-
public
OC\Template\Base::
append
($key, $value)¶ - Appends a variable
Source: Parameters: - $key (string) key
- $value (mixed) value
This function assigns a variable in an array context. If the key already exists, the value will be appended. It can be accessed via $_[$key][$position] in the template.
-
public
OC\Template\Base::
printPage
()¶ - Prints the proceeded template
Source: lib/private/Template/Base.php#131 Returns: bool This function proceeds the template and prints its output.
-
public
OC\Template\Base::
fetchPage
($additionalParams=null)¶ - Process the template
Source: Parameters: - $additionalParams (array | null)
Returns: string This function processes the template.
This function processes the template.
-
protected
OC\Template\Base::
load
($file, $additionalParams=null)¶ - doing the actual work
Source: Parameters: - $file (string)
- $additionalParams (array | null)
Returns: string content
Includes the template file, fetches its output