function mymodule_form_node_form_alter(&$form, FormStateInterface $form_state) {
$form['actions']['submit']['#submit'][] = 'mymodule_node_form_submit';
}
function mymodule_node_form_submit($form, FormStateInterface $form_state) {
}
function mymodule_menu() {
$items['custom'] = array(
'page callback' => 'mymodule_custom',
);
return $items;
}
function mymodule_custom() {
echo 'custom';
}