eZPublishCommunityProject  2013.9
eZ\Publish\Core\MVC\Legacy\Templating\Twig\Template Class Reference

Twig Template class representation for a legacy template. More...

+ Inheritance diagram for eZ\Publish\Core\MVC\Legacy\Templating\Twig\Template:
+ Collaboration diagram for eZ\Publish\Core\MVC\Legacy\Templating\Twig\Template:

Public Member Functions

 __construct ($templateName, Twig_Environment $env, LegacyEngine $legacyEngine)
 
 display (array $context, array $blocks=array())
 Displays the template with the given context. More...
 
 getEnvironment ()
 Returns the bound environment for this template. More...
 
 getTemplateName ()
 
 render (array $context)
 Renders the template with the given context and returns it as string. More...
 

Private Attributes

 $env
 
 $legacyEngine
 
 $templateName
 

Detailed Description

Twig Template class representation for a legacy template.

Constructor & Destructor Documentation

eZ\Publish\Core\MVC\Legacy\Templating\Twig\Template::__construct (   $templateName,
Twig_Environment  $env,
LegacyEngine  $legacyEngine 
)

Member Function Documentation

eZ\Publish\Core\MVC\Legacy\Templating\Twig\Template::display ( array  $context,
array  $blocks = array() 
)

Displays the template with the given context.

Parameters
array$contextAn array of parameters to pass to the template
array$blocksAn array of blocks to pass to the template
eZ\Publish\Core\MVC\Legacy\Templating\Twig\Template::getEnvironment ( )

Returns the bound environment for this template.

Returns
Twig_Environment The current environment
eZ\Publish\Core\MVC\Legacy\Templating\Twig\Template::getTemplateName ( )
Returns
string
eZ\Publish\Core\MVC\Legacy\Templating\Twig\Template::render ( array  $context)

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

Parameters
array$contextAn array of parameters to pass to the template
Returns
string The rendered template

Referenced by eZ\Publish\Core\MVC\Legacy\Templating\Twig\Template\display().

Member Data Documentation

eZ\Publish\Core\MVC\Legacy\Templating\Twig\Template::$env
private
eZ\Publish\Core\MVC\Legacy\Templating\Twig\Template::$legacyEngine
private
eZ\Publish\Core\MVC\Legacy\Templating\Twig\Template::$templateName
private

The documentation for this class was generated from the following file: