function twig_theme

Same name in other branches
  1. 8.9.x core/themes/engines/twig/twig.engine \twig_theme()
  2. 10 core/themes/engines/twig/twig.engine \twig_theme()
  3. 11.x core/themes/engines/twig/twig.engine \twig_theme()

Implements hook_theme().

File

core/themes/engines/twig/twig.engine, line 16

Code

function twig_theme($existing, $type, $theme, $path) {
    $templates = drupal_find_theme_functions($existing, [
        $theme,
    ]);
    $templates += drupal_find_theme_templates($existing, '.html.twig', $path);
    return $templates;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.