function paragraph_blocks_panels_ipe_blocks_alter in Paragraph blocks 3.x
Same name and namespace in other branches
- 8.2 paragraph_blocks.module \paragraph_blocks_panels_ipe_blocks_alter()
- 8 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.
/** @var \Drupal\paragraph_blocks\ParagraphBlocksLabeller $labeller */
$labeller = \Drupal::service('paragraph_blocks.labeller');
$labeller
->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;
}
}
}