function page_manager_ui_preprocess_block in Page Manager 8.4
Implements hook_preprocess_HOOK().
@todo Refactor/remove if https://www.drupal.org/project/drupal/issues/3005403 lands.
File
- page_manager_ui/
page_manager_ui.module, line 172 - Provides a UI for Page Manager.
Code
function page_manager_ui_preprocess_block(&$variables) {
if (Drupal::theme()
->getActiveTheme()
->getName() === 'seven') {
// If active theme is seven and the block has layout_builder contextual
// links, do nothing.
if (isset($variables['elements']['#contextual_links']['layout_builder_block'])) {
return;
}
// Fallback to seven.
seven_preprocess_block($variables);
}
}