public function Loader::loadBlock in Bamboo Twig 8
Load a given block with or whitout parameters.
File
- bamboo_twig_loaders/
src/ TwigExtension/ Loader.php, line 94
Class
- Loader
- Provides a 'Loader' Twig Extensions.
Namespace
Drupal\bamboo_twig_loaders\TwigExtensionCode
public function loadBlock($block_id, $params = []) {
$instance = $this->blockManager
->createInstance($block_id, $params);
return $instance
->build($params);
}