You are here

public function Render::getFunctions in Bamboo Twig 8.4

Same name and namespace in other branches
  1. 8.5 bamboo_twig_loader/src/TwigExtension/Render.php \Drupal\bamboo_twig_loader\TwigExtension\Render::getFunctions()
  2. 8.2 bamboo_twig_loader/src/TwigExtension/Render.php \Drupal\bamboo_twig_loader\TwigExtension\Render::getFunctions()
  3. 8.3 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 17

Class

Render
Provides some renderer as Twig Extensions.

Namespace

Drupal\bamboo_twig_loader\TwigExtension

Code

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