You are here

public function Loader::getFunctions in Bamboo Twig 8.4

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

File

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

Class

Loader
Provides some loaders as Twig Extensions.

Namespace

Drupal\bamboo_twig_loader\TwigExtension

Code

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