class Template (View source)

Handle front end templating

Constants

TEMPLATES_FOLDER

Properties

static protected Environment|null $twig

Twig environment

Methods

__construct(Config|null $config = null)

No description

static Environment
getTwigEnvironment(string|null $cacheDir, bool $isDevEnv)

No description

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

No description

void
disableCache()

No description

Details

__construct(Config|null $config = null)

No description

Parameters

Config|null $config

static Environment getTwigEnvironment(string|null $cacheDir, bool $isDevEnv)

No description

Parameters

string|null $cacheDir
bool $isDevEnv

Return Value

Environment

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

No description

Parameters

string $template

Template path name

array $data

Associative array of template variables

Return Value

string

Exceptions

Throwable
LoaderError
RuntimeError
SyntaxError

void disableCache()

No description

Return Value

void