You are here

public function TwigExtension::getFunctions in Components! 8

Same name and namespace in other branches
  1. 8.2 src/Template/TwigExtension.php \Drupal\components\Template\TwigExtension::getFunctions()
  2. 3.x src/Template/TwigExtension.php \Drupal\components\Template\TwigExtension::getFunctions()

File

src/Template/TwigExtension.php, line 41

Class

TwigExtension
A class providing components's Twig extensions.

Namespace

Drupal\components\Template

Code

public function getFunctions() {
  return [
    new \Twig_SimpleFunction('theme', [
      $this,
      'theme',
    ]),
  ];
}