Render twig templates.
This retrieves the Twig_Environment from the Drupal Injection container and renders the template.
$template_file: The filename of the template to render.
$variables: A keyed array of variables that will appear in the output.
The output generated by the template.
function twig_render_template($template_file, $variables) {
$variables['_references'] = array();
return drupal_container()
->get('twig')
->loadTemplate($template_file)
->render($variables);
}