function og_menu_overview_form in Organic Groups Menu (OG Menu) 6
Same name and namespace in other branches
- 6.2 og_menu.module \og_menu_overview_form()
- 7.3 og_menu.pages.inc \og_menu_overview_form()
- 7.2 og_menu.pages.inc \og_menu_overview_form()
Menu callback which shows an entire menu tree at once.
1 string reference to 'og_menu_overview_form'
- og_menu_menu in ./
og_menu.module - Implementation of hook_menu().
File
- ./
og_menu.module, line 316 - Integrates Menu with Organic Groups. Lots of menu forms duplication in OG context.
Code
function og_menu_overview_form(&$form_state, $node, $menu) {
module_load_include('inc', 'menu', 'menu.admin');
$form = drupal_retrieve_form('menu_overview_form', $form_state, $menu);
$form['#theme'] = 'menu_overview_form';
foreach (element_children($form) as $mlid) {
if (strstr($mlid, 'mlid:')) {
$item = $form[$mlid]['#item'];
$operations = array();
$operations['edit'] = l(t('edit'), 'node/' . $node->nid . '/og_menu/' . $menu['menu_name'] . '/' . $item['mlid'] . '/edit');
if ($item['module'] == 'menu' || $item['updated'] == 1) {
$operations['delete'] = l(t('delete'), 'node/' . $node->nid . '/og_menu/' . $menu['menu_name'] . '/' . $item['mlid'] . '/delete');
}
$form[$mlid]['operations'] = array();
foreach ($operations as $op => $value) {
$form[$mlid]['operations'][$op] = array(
'#value' => $value,
);
}
$form['delete']['#submit'][] = 'og_menu_item_delete_submit';
}
}
return $form;
}