twig_render_template

function twig_render_template

twig_render_template($template_file, array $variables)

Implements hook_render_template().

Renders a Twig template.

If the Twig debug setting is enabled, HTML comments including the theme hook and template file name suggestions will surround the template markup.

Parameters

string $template_file: The file name of the template to render.

array $variables: A keyed array of variables that will appear in the output.

Return value

string|\Drupal\Component\Render\MarkupInterface The output generated by the template, plus any debug information.

File

core/themes/engines/twig/登录查看完整内容