menu_link_content_menu_delete

menu_link_content_menu_delete(MenuInterface $menu)

Implements hook_menu_delete().

File

core/modules/menu_link_content/menu_link_content.module, line 34
Allows administrators to create custom menu links.

Code

1
2
3
4
5
function menu_link_content_menu_delete(MenuInterface $menu) {
  $storage = \Drupal::entityManager()->getStorage('menu_link_content');
  $menu_links = $storage->loadByProperties(array('menu_name' => $menu->id()));
  $storage->delete($menu_links);
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.