outside_in_block_alter

outside_in_block_alter(&$definitions)

Implements hook_block_alter().

File

core/modules/outside_in/outside_in.module, line 131
Allows configuring blocks and other configuration from the site front-end.

Code

function outside_in_block_alter(&$definitions) {
  if (!empty($definitions['system_branding_block'])) {
    $definitions['system_branding_block']['forms']['offcanvas'] = SystemBrandingOffCanvasForm::class;
  }

  // Since menu blocks use derivatives, check the definition ID instead of
  // relying on the plugin ID.
  foreach ($definitions as &$definition) {
    if ($definition['id'] === 'system_menu_block') {
      $definition['forms']['offcanvas'] = SystemMenuOffCanvasForm::class;
    }
  }
}
doc_Drupal
2016-10-29 09:32:42
Comments
Leave a Comment

Please login to continue.