Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. SystemHooks.php

function SystemHooks::blockViewSystemMainBlockAlter

Implements hook_block_view_BASE_BLOCK_ID_alter().

File

core/modules/system/src/Hook/SystemHooks.php, line 366

Class

SystemHooks
Hook implementations for system.

Namespace

Drupal\system\Hook

Code

public function blockViewSystemMainBlockAlter(array &$build, BlockPluginInterface $block) : void {
    // Contextual links on the system_main block would basically duplicate the
    // tabs/local tasks, so reduce the clutter.
    unset($build['#contextual_links']);
}
RSS feed
Powered by Drupal