function og_menu_menu in Organic Groups Menu (OG Menu) 5
Same name and namespace in other branches
- 6.2 og_menu.module \og_menu_menu()
- 6 og_menu.module \og_menu_menu()
- 7.3 og_menu.module \og_menu_menu()
- 7.2 og_menu.module \og_menu_menu()
Implementation of hook_menu().
File
- ./
og_menu.module, line 41 - Modifies the menu module to support menus specific to organic groups.
Code
function og_menu_menu($may_cache) {
$items = array();
if ($may_cache) {
$items[] = array(
'path' => 'admin/build/menu',
'title' => t('OG Menus'),
'callback' => 'og_menu_overview',
'access' => user_access('administer site configuration'),
'type' => MENU_CALLBACK,
'weight' => 0,
);
$items[] = array(
'path' => 'admin/build/menu',
'title' => t('Edit Menus'),
'description' => t('Manage menus associated with your organic groups.'),
'access' => user_access('administer og menus'),
'type' => MENU_NORMAL_ITEM,
);
/* $items[] = array('path' => 'admin/build/menu/menu/activate',
'title' => t('Activate Menus'),
'callback' => 'og_menu_activate_menus',
'access' => user_access('administer og menus'),
'type' => MENU_LOCAL_TASK); */
$items[] = array(
'path' => 'admin/build/menu/menu/add',
'title' => t('Add menu'),
'callback' => 'drupal_not_found',
'access' => user_access('administer og menus'),
'type' => MENU_CALLBACK,
);
/* $items[] = array('path' => 'admin/build/menu/menu/add',
'title' => t('Add submenu'),
'callback' => 'og_menu_edit_menu',
'callback arguments' => array('add'),
'access' => user_access('administer og menus'),
'type' => MENU_LOCAL_TASK); */
$items[] = array(
'path' => 'admin/build/menu/menu/edit',
'title' => t('Edit menu'),
'callback' => 'drupal_get_form',
'callback arguments' => array(
'menu_edit_menu_form',
'edit',
),
'access' => user_access('administer og menus'),
'type' => MENU_CALLBACK,
);
$items[] = array(
'path' => 'admin/build/menu/menu/delete',
'title' => t('Delete menu'),
'callback' => 'drupal_get_form',
'callback arguments' => array(
'menu_item_delete_form',
),
'access' => user_access('administer all menus'),
'type' => MENU_CALLBACK,
);
$items[] = array(
'path' => 'admin/build/menu/item/add',
'title' => t('Add menu item'),
'callback' => 'drupal_get_form',
'callback arguments' => array(
'menu_edit_item_form',
'add',
),
'access' => user_access('administer og menus'),
'type' => MENU_LOCAL_TASK,
);
$items[] = array(
'path' => 'admin/build/menu/item/edit',
'title' => t('Edit menu item'),
'callback' => 'drupal_get_form',
'callback arguments' => array(
'menu_edit_item_form',
'edit',
),
'access' => user_access('administer og menus'),
'type' => MENU_CALLBACK,
);
$items[] = array(
'path' => 'admin/build/menu/item/reset',
'title' => t('Reset menu item'),
'callback' => 'drupal_get_form',
'callback arguments' => array(
'menu_reset_item',
),
'access' => user_access('administer og menus'),
'type' => MENU_CALLBACK,
);
$items[] = array(
'path' => 'admin/build/menu/item/disable',
'title' => t('Disable menu item'),
'callback' => 'drupal_get_form',
'callback arguments' => array(
'menu_confirm_disable_item',
),
'access' => user_access('administer og menus'),
'type' => MENU_CALLBACK,
);
$items[] = array(
'path' => 'admin/build/menu/item/delete',
'title' => t('Delete menu item'),
'callback' => 'drupal_get_form',
'callback arguments' => array(
'menu_item_delete_form',
),
'access' => user_access('administer og menus'),
'type' => MENU_CALLBACK,
);
$items[] = array(
'path' => 'admin/build/menu/settings',
'title' => t('Settings'),
'callback' => 'drupal_get_form',
'callback arguments' => array(
'menu_configure',
),
'type' => MENU_LOCAL_TASK,
'weight' => 5,
'access' => user_access('administer all menus'),
);
}
return $items;
}