hook_menu_link_delete

  1. drupal
    1. 8
    2. 7
Versions
7 – 8 hook_menu_link_delete($link)

Inform modules that a menu link has been deleted.

This hook is used to notify modules that menu items have been deleted. Contributed modules may use the information to perform actions based on the information entered into the menu system.

Parameters

$link Associative array defining a menu link as passed into menu_link_save().

See also

hook_menu_link_insert()

hook_menu_link_update()

Related topics

Code

modules/system/system.api.php, line 1351

<?php
function hook_menu_link_delete($link) {
  // Delete the record from our table.
  db_delete('menu_example')
    ->condition('mlid', $link['mlid'])
    ->execute();
}
?>