Interface Twig_TemplateInterface

Implemented byTwig_Template
Deprecated since version since 1.12 (to be removed in 3.0)

Interface implemented by all compiled templates.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
display() Displays the template with the given context. Twig_TemplateInterface
getEnvironment() Returns the bound environment for this template. Twig_TemplateInterface
render() Renders the template with the given context and returns it as string. Twig_TemplateInterface

Method Details

display() public abstract method

Displays the template with the given context.

public abstract void display ( array $context, array $blocks = [] )
$context array

An array of parameters to pass to the template

$blocks array

An array of blocks to pass to the template

getEnvironment() public abstract method

Returns the bound environment for this template.

public abstract Twig_Environment getEnvironment ( )
return Twig_Environment

The current environment

render() public abstract method

Renders the template with the given context and returns it as string.

public abstract string render ( array $context )
$context array

An array of parameters to pass to the template

return string

The rendered template