Skip to content

Instantly share code, notes, and snippets.

@jacerider
Last active January 12, 2017 20:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jacerider/08a4246fd327fdac5f64814a58721e27 to your computer and use it in GitHub Desktop.
Save jacerider/08a4246fd327fdac5f64814a58721e27 to your computer and use it in GitHub Desktop.
D8 | Reuse an existing block
$block = \Drupal\block\Entity\Block::load('your_block_id');
$variables['block_output'] = \Drupal::entityTypeManager()
  ->getViewBuilder('block')
  ->view($block);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment