function LayoutBuilderHooks::pluginFilterBlockLayoutBuilderAlter
Implements hook_plugin_filter_TYPE__CONSUMER_alter().
Attributes
#[Hook('plugin_filter_block__layout_builder_alter')]
File
-
core/
modules/ layout_builder/ src/ Hook/ LayoutBuilderHooks.php, line 258
Class
- LayoutBuilderHooks
- Hook implementations for layout_builder.
Namespace
Drupal\layout_builder\HookCode
public function pluginFilterBlockLayoutBuilderAlter(array &$definitions, array $extra) : void {
// 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.