class Template

Class Template

Handle front end templating

Constants

BASE_PATH

Properties

static protected Environment $twig Twig environment

Methods

__construct()

Template constructor

Twig_TemplateWrapper
load(string $templateName)

Loads a template.

string
render(string $template, array $data = [])

No description

Details

at line 58
__construct()

Template constructor

at line 100
Twig_TemplateWrapper load(string $templateName)

Loads a template.

Parameters

string $templateName Template path name

Return Value

Twig_TemplateWrapper

Exceptions

LoaderError
RuntimeError
SyntaxError

at line 135
string render(string $template, array $data = [])

Parameters

string $template Template path name
array $data Associative array of template variables

Return Value

string

Exceptions

Throwable
Twig_Error_Loader
Twig_Error_Runtime
Twig_Error_Syntax