You are here

function og_menu_edit_menu_form_submit in Organic Groups Menu (OG Menu) 6

Same name and namespace in other branches
  1. 6.2 og_menu.module \og_menu_edit_menu_form_submit()
  2. 7.3 og_menu.module \og_menu_edit_menu_form_submit()
  3. 7.2 og_menu.module \og_menu_edit_menu_form_submit()
2 string references to 'og_menu_edit_menu_form_submit'
og_menu_edit_menu_form in ./og_menu.module
Menu callback; Build the form that handles the adding/editing of a custom menu.
og_menu_form_alter in ./og_menu.module
Implementation of hook_form_alter().

File

./og_menu.module, line 368
Integrates Menu with Organic Groups. Lots of menu forms duplication in OG context.

Code

function og_menu_edit_menu_form_submit($form, &$form_state) {
  $menu_name = $form_state['values']['menu_name'];
  $gid = $form_state['values']['og_menu_gid'];

  // Add 'menu-' if this is a new menu
  if (strpos($menu_name, 'menu-') === FALSE) {
    $menu_name = 'menu-' . $menu_name;
  }
  og_menu_update_menu($menu_name, $gid);
}