function menu_node_submit

Implements hook_node_submit().

See also

menu_form_node_form_alter()

File

drupal/core/modules/menu/menu.module, line 653
Allows administrators to customize the site's navigation menus.

Code

function menu_node_submit(EntityInterface $node, $form, $form_state) {
  $node->menu = entity_create('menu_link', $form_state['values']['menu']);

  // Decompose the selected menu parent option into 'menu_name' and 'plid', if
  // the form used the default parent selection widget.
  if (!empty($form_state['values']['menu']['parent'])) {
    list($node->menu['menu_name'], $node->menu['plid']) = explode(':', $form_state['values']['menu']['parent']);
  }
}