Delete a node and a menu_link I have a simply question, it's possible to delete a node and at the same time delete a menu_links ? For exemple when i will use the button delete of a node of my entity "PROJECT" i want to delete automaticaly a menu_links created before. I found the HOOK_Delete but how to use this function in a particular entity ? Like the HOOK_form_alter we can choose the form_id, there is a HOOK like this ? :

Mymodule_delete($nid) {
    if($entity == "project") {
        delete($nid);
    }
}


Maybe can i change the $form['actions']['delete ??'] in my form alter and use my own function ?

_myfunction_delete_project($nid) {
    $query = "Here get the entity of my $nid";

    if($query == "project") {
        delete($nid);
        delete($my menu links);
    }
}


I hope you understand my request

Thanks
You can do it simply using hook_node_delete.

function hook_node_delete($node) {
  if ($node-&gt;type == 'any_content_type') { // for specific content type
    // here your code use $node-&gt;nid
  }
}