menu_ui_menu_insert

menu_ui_menu_insert(Menu $menu)

Implements hook_ENTITY_TYPE_insert( for menu entities.

File

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

Code

function menu_ui_menu_insert(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();
  }
}
doc_Drupal
2016-10-29 09:27:52
Comments
Leave a Comment

Please login to continue.