You are here

function menu_ui_menu_delete in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/menu_ui/menu_ui.module \menu_ui_menu_delete()

Implements hook_ENTITY_TYPE_delete() for menu entities.

File

core/modules/menu_ui/menu_ui.module, line 109
Allows administrators to customize the site's navigation menus.

Code

function menu_ui_menu_delete(Menu $menu) {
  menu_cache_clear_all();

  // Invalidate the block cache to update menu-based derivatives.
  if (\Drupal::moduleHandler()
    ->moduleExists('block')) {
    \Drupal::service('plugin.manager.block')
      ->clearCachedDefinitions();
  }
}