function SystemHooks::systemInfoAlter

Same name and namespace in other branches
  1. 11.x core/modules/system/src/Hook/SystemHooks.php \Drupal\system\Hook\SystemHooks::systemInfoAlter()

Implements hook_system_info_alter().

Attributes

#[Hook('system_info_alter')]

File

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

Class

SystemHooks
Hook implementations for system.

Namespace

Drupal\system\Hook

Code

public function systemInfoAlter(&$info, Extension $file, $type) : void {
  // Remove page-top and page-bottom from the blocks UI since they are
  // reserved for
  // modules to populate from outside the blocks system.
  if ($type == 'theme') {
    $info['regions_hidden'][] = 'page_top';
    $info['regions_hidden'][] = 'page_bottom';
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.