You are here

function paragraph_blocks_panels_ipe_blocks_alter in Paragraph blocks 8

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

Implements hook_panels_ipe_blocks_alter().

File

./paragraph_blocks.module, line 56
Contains paragraph_blocks.module.

Code

function paragraph_blocks_panels_ipe_blocks_alter(&$blocks) {

  // Remove unused paragraphs and update the panels title from the paragraph.
  $panels_ipe_manager = ParagraphBlocksPanelsIpeManager::create(\Drupal::getContainer());
  $panels_ipe_manager
    ->hookPanelsIpeBlocksAlter($blocks);

  // Change the title of the "Content" block to "Full content".
  foreach ($blocks as $delta => $block) {
    if ($block['plugin_id'] == 'entity_field:node:field_content') {
      $blocks[$delta]['label'] = t('Full content');
      break;
    }
  }
}