You are here

public function TwigExtension::getFunctions in Components! 3.x

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

File

src/Template/TwigExtension.php, line 18

Class

TwigExtension
A class providing components' Twig extensions.

Namespace

Drupal\components\Template

Code

public function getFunctions() : array {
  return [
    new TwigFunction('template', [
      $this,
      'template',
    ], [
      'is_variadic' => TRUE,
    ]),
  ];
}