public static function TwigTweakExtension::drupalRegion in Twig Tweak 3.1.x
Same name and namespace in other branches
- 3.x src/TwigTweakExtension.php \Drupal\twig_tweak\TwigTweakExtension::drupalRegion()
Builds the render array of a given region.
File
- src/
TwigTweakExtension.php, line 151
Class
- TwigTweakExtension
- Twig extension with some useful functions and filters.
Namespace
Drupal\twig_tweakCode
public static function drupalRegion(string $region, ?string $theme = NULL) : array {
return \Drupal::service('twig_tweak.region_view_builder')
->build($region, $theme);
}