interface ViewInterface

View interface

Methods

mixed|null
getService(string $name)

Get service

array
getGlobals()

Get all global vars

void
addGlobal(string $name, mixed $value)

Add global variable

string
getTemplatesPath()

Get templates path

string
getPrimaryTemplate()

Get primary template

void
setPrimaryTemplate(string $templateName)

Set primary template

string|null
fetch(string $template, array $params = [])

Render template

string|null
fetchBlock(string $template, string $block, array $params = [])

Render template block

string
fetchFromString(string $string, array $params = [])

Render template from string

Environment
getEnvironment()

Get Twig environment

CacheInterface
getCache()

Get cache

string
getExtensionsPath()

Gte extensions path

string
getViewPath()

Get view path

ExtensionInterface
getExtension(string $class)

Get twig extension

ExtensionInterface
getCurrentExtension()

Get current extension

mixed
createComponent(string $name, string $language, string $type)

Create component

renderComponent(string $name, array|null $params = [], string $language, string|null $type = null)

Render html component

Details

at line 23
mixed|null getService(string $name)

Get service

Parameters

string $name

Return Value

mixed|null

at line 30
array getGlobals()

Get all global vars

Return Value

array

at line 39
void addGlobal(string $name, mixed $value)

Add global variable

Parameters

string $name
mixed $value

Return Value

void

at line 46
string getTemplatesPath()

Get templates path

Return Value

string

at line 53
string getPrimaryTemplate()

Get primary template

Return Value

string

at line 61
void setPrimaryTemplate(string $templateName)

Set primary template

Parameters

string $templateName

Return Value

void

at line 70
string|null fetch(string $template, array $params = [])

Render template

Parameters

string $template
array $params

Return Value

string|null

at line 80
string|null fetchBlock(string $template, string $block, array $params = [])

Render template block

Parameters

string $template
string $block
array $params

Return Value

string|null

at line 89
string fetchFromString(string $string, array $params = [])

Render template from string

Parameters

string $string
array $params

Return Value

string

at line 96
Environment getEnvironment()

Get Twig environment

Return Value

Environment

at line 103
CacheInterface getCache()

Get cache

Return Value

CacheInterface

at line 110
string getExtensionsPath()

Gte extensions path

Return Value

string

at line 117
string getViewPath()

Get view path

Return Value

string

at line 124
ExtensionInterface getExtension(string $class)

Get twig extension

Parameters

string $class

Return Value

ExtensionInterface

at line 131
ExtensionInterface getCurrentExtension()

Get current extension

Return Value

ExtensionInterface

at line 141
mixed createComponent(string $name, string $language, string $type)

Create component

Parameters

string $name
string $language
string $type

Return Value

mixed

at line 152
HtmlComponentInterface renderComponent(string $name, array|null $params = [], string $language, string|null $type = null)

Render html component

Parameters

string $name
array|null $params
string $language
string|null $type

Return Value

HtmlComponentInterface