You are here

function og_menu_edit_item_form in Organic Groups Menu (OG Menu) 6

Same name and namespace in other branches
  1. 6.2 og_menu.module \og_menu_edit_item_form()
  2. 7.3 og_menu.pages.inc \og_menu_edit_item_form()
  3. 7.2 og_menu.pages.inc \og_menu_edit_item_form()

Menu callback; Build the menu link editing form.

1 string reference to 'og_menu_edit_item_form'
og_menu_menu in ./og_menu.module
Implementation of hook_menu().

File

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

Code

function og_menu_edit_item_form(&$form_state, $type, $item, $menu) {
  module_load_include('inc', 'menu', 'menu.admin');
  $form = drupal_retrieve_form('menu_edit_item', $form_state, $type, $item, $menu);
  $list = array();
  $menus = og_menu_get_menus();
  foreach ($menus as $menu) {
    $list[$menu['menu_name']] = $menu['title'];
  }
  $form['menu']['parent']['#options'] = menu_parent_options($list, $form['menu']['#item']);
  $form['#item'] = $item;
  $form['#submit'][] = 'menu_edit_item_submit';
  $form['#submit'][] = 'og_menu_redirect';
  $form['delete']['#submit'][] = 'og_menu_delete_item_form';
  return $form;
}