You are here

public function Render::getFunctions in Bamboo Twig 8.5

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

List of all Twig functions.

File

bamboo_twig_loader/src/TwigExtension/Render.php, line 18

Class

Render
Provides some renderer as Twig Extensions.

Namespace

Drupal\bamboo_twig_loader\TwigExtension

Code

public function getFunctions() {
  return [
    new TwigFunction('bamboo_render_block', [
      $this,
      'renderBlock',
    ], [
      'is_safe' => [
        'html',
      ],
    ]),
    new TwigFunction('bamboo_render_form', [
      $this,
      'renderForm',
    ], [
      'is_safe' => [
        'html',
      ],
    ]),
    new TwigFunction('bamboo_render_entity', [
      $this,
      'renderEntity',
    ], [
      'is_safe' => [
        'html',
      ],
    ]),
    new TwigFunction('bamboo_render_region', [
      $this,
      'renderRegion',
    ], [
      'is_safe' => [
        'html',
      ],
    ]),
    new TwigFunction('bamboo_render_field', [
      $this,
      'renderField',
    ], [
      'is_safe' => [
        'html',
      ],
    ]),
    new TwigFunction('bamboo_render_image', [
      $this,
      'renderImage',
    ], [
      'is_safe' => [
        'html',
      ],
    ]),
    new TwigFunction('bamboo_render_image_style', [
      $this,
      'renderImageStyle',
    ], [
      'is_safe' => [
        'html',
      ],
    ]),
    new TwigFunction('bamboo_render_menu', [
      $this,
      'renderMenu',
    ], [
      'is_safe' => [
        'html',
      ],
    ]),
    new TwigFunction('bamboo_render_views', 'views_embed_view'),
  ];
}