PHP Class Frontend\Core\Engine\TwigTemplate

Inheritance: extends Common\Core\Twig\BaseTwigTemplate
Datei anzeigen Open project: forkcms/forkcms Class Usage Examples

Public Methods

Method Description
__construct ( ) The constructor will store the instance in the reference, preset some settings and map the custom modifiers.
addGlobal ( string $name, mixed $value ) Adds a global variable to the template
getContent ( string $template ) : string Fetch the parsed content from this template.
getPath ( string $template ) : string Convert a filename extension
render ( string $template, array $variables = [] ) : string

Private Methods

Method Description
getFormTemplates ( string $fileName ) : array
getLoadingFolders ( ) : array

Method Details

__construct() public method

The constructor will store the instance in the reference, preset some settings and map the custom modifiers.
public __construct ( )

addGlobal() public method

Adds a global variable to the template
public addGlobal ( string $name, mixed $value )
$name string
$value mixed

getContent() public method

Fetch the parsed content from this template.
public getContent ( string $template ) : string
$template string The location of the template file, used to display this template.
return string The actual parsed content after executing this template.

getPath() public method

Convert a filename extension
public getPath ( string $template ) : string
$template string
return string

render() public method

public render ( string $template, array $variables = [] ) : string
$template string
$variables array
return string