You are here

function paragraph_blocks_plugin_filter_block__layout_builder_alter in Paragraph blocks 8.2

Same name and namespace in other branches
  1. 3.x paragraph_blocks.module \paragraph_blocks_plugin_filter_block__layout_builder_alter()

Implements hook_plugin_filter_block__layout_builder_alter().

File

./paragraph_blocks.module, line 95
Contains paragraph_blocks.module.

Code

function paragraph_blocks_plugin_filter_block__layout_builder_alter(array &$definitions, array $extra) {

  // Remove unused paragraphs and update the panels title from the paragraph.

  /** @var \Drupal\paragraph_blocks\ParagraphBlocksLabeller $labeller */
  $labeller = \Drupal::service('paragraph_blocks.labeller');
  $labeller
    ->hookLayoutBuilderChooseBlocksAlter($definitions);
}