function layout_builder_plugin_filter_block__layout_builder_alter

Same name and namespace in other branches
  1. 9 core/modules/layout_builder/layout_builder.module \layout_builder_plugin_filter_block__layout_builder_alter()
  2. 8.9.x core/modules/layout_builder/layout_builder.module \layout_builder_plugin_filter_block__layout_builder_alter()
  3. 10 core/modules/layout_builder/layout_builder.module \layout_builder_plugin_filter_block__layout_builder_alter()

Implements hook_plugin_filter_TYPE__CONSUMER_alter().

File

core/modules/layout_builder/layout_builder.module, line 228

Code

function layout_builder_plugin_filter_block__layout_builder_alter(array &$definitions, array $extra) {
    // Remove blocks that are not useful within Layout Builder.
    unset($definitions['system_messages_block']);
    unset($definitions['help_block']);
    unset($definitions['local_tasks_block']);
    unset($definitions['local_actions_block']);
    // Remove blocks that are non-functional within Layout Builder.
    unset($definitions['system_main_block']);
    // @todo Restore the page title block in https://www.drupal.org/node/2938129.
    unset($definitions['page_title_block']);
}

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