\Twig_TemplateWrapper

Exposes a template to userland.

Summary

Methods
Properties
Constants
render()
display()
hasBlock()
getBlockNames()
renderBlock()
displayBlock()
getSourceContext()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$env
$template
N/A

Properties

$env

$env : 

Type

$template

$template : 

Type

Methods

render()

render(array  $context = array()) : string

Renders the template.

Parameters

array $context

An array of parameters to pass to the template

Returns

string —

The rendered template

display()

display(array  $context = array()) 

Displays the template.

Parameters

array $context

An array of parameters to pass to the template

hasBlock()

hasBlock(string  $name, array  $context = array()) : boolean

Checks if a block is defined.

Parameters

string $name

The block name

array $context

An array of parameters to pass to the template

Returns

boolean

getBlockNames()

getBlockNames(array  $context = array()) : array<mixed,string>

Returns defined block names in the template.

Parameters

array $context

An array of parameters to pass to the template

Returns

array<mixed,string> —

An array of defined template block names

renderBlock()

renderBlock(string  $name, array  $context = array()) : string

Renders a template block.

Parameters

string $name

The block name to render

array $context

An array of parameters to pass to the template

Returns

string —

The rendered block

displayBlock()

displayBlock(string  $name, array  $context = array()) 

Displays a template block.

Parameters

string $name

The block name to render

array $context

An array of parameters to pass to the template

getSourceContext()

getSourceContext() : \Twig_Source

Returns

\Twig_Source