2 * Implements hook_block_view_alter().
4 function {{ machine_name }}_block_view_alter(array &$build, \Drupal\Core\Block\BlockPluginInterface $block) {
5 // Remove the contextual links on all blocks that provide them.
6 if (isset($build['#contextual_links'])) {
7 unset($build['#contextual_links']);