You are here

public function Loader::getFunctions in Bamboo Twig 8

List of all Twig functions.

File

bamboo_twig_loaders/src/TwigExtension/Loader.php, line 73

Class

Loader
Provides a 'Loader' Twig Extensions.

Namespace

Drupal\bamboo_twig_loaders\TwigExtension

Code

public function getFunctions() {
  return [
    new \Twig_SimpleFunction('load_block', [
      $this,
      'loadBlock',
    ], [
      'is_safe' => [
        'html',
      ],
    ]),
    new \Twig_SimpleFunction('load_form', [
      $this,
      'loadForm',
    ], [
      'is_safe' => [
        'html',
      ],
    ]),
    new \Twig_SimpleFunction('load_entity', [
      $this,
      'loadEntity',
    ]),
    new \Twig_SimpleFunction('load_region', [
      $this,
      'loadRegion',
    ], [
      'is_safe' => [
        'html',
      ],
    ]),
    new \Twig_SimpleFunction('load_field', [
      $this,
      'loadField',
    ]),
    new \Twig_SimpleFunction('load_menu', [
      $this,
      'loadMenu',
    ], [
      'is_safe' => [
        'html',
      ],
    ]),
  ];
}