public static function TwigTweakExtension::drupalBlock in Twig Tweak 3.1.x
Same name and namespace in other branches
- 3.x src/TwigTweakExtension.php \Drupal\twig_tweak\TwigTweakExtension::drupalBlock()
Builds the render array for a block.
File
- src/
TwigTweakExtension.php, line 144
Class
- TwigTweakExtension
- Twig extension with some useful functions and filters.
Namespace
Drupal\twig_tweakCode
public static function drupalBlock(string $id, array $configuration = [], bool $wrapper = TRUE) : array {
return \Drupal::service('twig_tweak.block_view_builder')
->build($id, $configuration, $wrapper);
}