You are here

public function Loader::getFunctions in Bamboo Twig 8.5

Same name and namespace in other branches
  1. 8.2 bamboo_twig_loader/src/TwigExtension/Loader.php \Drupal\bamboo_twig_loader\TwigExtension\Loader::getFunctions()
  2. 8.3 bamboo_twig_loader/src/TwigExtension/Loader.php \Drupal\bamboo_twig_loader\TwigExtension\Loader::getFunctions()
  3. 8.4 bamboo_twig_loader/src/TwigExtension/Loader.php \Drupal\bamboo_twig_loader\TwigExtension\Loader::getFunctions()

File

bamboo_twig_loader/src/TwigExtension/Loader.php, line 16

Class

Loader
Provides some loaders as Twig Extensions.

Namespace

Drupal\bamboo_twig_loader\TwigExtension

Code

public function getFunctions() {
  return [
    new TwigFunction('bamboo_load_entity', [
      $this,
      'loadEntity',
    ]),
    new TwigFunction('bamboo_load_field', [
      $this,
      'loadField',
    ]),
    new TwigFunction('bamboo_load_currentuser', [
      $this,
      'loadCurrentUser',
    ]),
    new TwigFunction('bamboo_load_image', [
      $this,
      'loadImage',
    ]),
  ];
}