public function Twig_Environment::render in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/twig/twig/lib/Twig/Environment.php \Twig_Environment::render()
Renders a template.
Parameters
string $name The template name:
array $context An array of parameters to pass to the template:
Return value
string The rendered template
Throws
Twig_Error_Loader When the template cannot be found
Twig_Error_Syntax When an error occurred during compilation
Twig_Error_Runtime When an error occurred during rendering
File
- vendor/
twig/ twig/ lib/ Twig/ Environment.php, line 345
Class
- Twig_Environment
- Stores the Twig configuration.
Code
public function render($name, array $context = array()) {
return $this
->loadTemplate($name)
->render($context);
}