You are here

function bigmenu_menu in Big Menu 7

Same name and namespace in other branches
  1. 6 bigmenu.module \bigmenu_menu()

Declare admin links and AJAX callbacks.

hook_menu()

File

./bigmenu.module, line 32
Alternative to core menu management.

Code

function bigmenu_menu() {

  // Edit just a part of a menu. Arg 5 is the parent menu link id.
  $items['admin/structure/menu/manage/%menu/bigmenu-customize/subform/%menu_link'] = array(
    'title' => 'Edit a slice of a menu',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'bigmenu_slice_form',
      4,
      7,
    ),
    'title callback' => 'bigmenu_parent_title',
    'title arguments' => array(
      7,
    ),
    'access arguments' => array(
      'use bigmenu',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'bigmenu.admin.inc',
  );

  // Same as above, but triggers an equivalent json response.
  // This also expects arg 7,8 to be a form ID and form cache id.
  $items['admin/structure/menu/manage/%menu/bigmenu-customize/subform/%menu_link/js'] = array(
    'page callback' => 'bigmenu_slice_form_js',
    'page arguments' => array(
      4,
      7,
    ),
    'access arguments' => array(
      'use bigmenu',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'bigmenu.admin.inc',
  );
  $items['admin/config/user-interface/bigmenu'] = array(
    'title' => 'Big Menu Settings',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'bigmenu_settings',
    ),
    'description' => 'Configure settings for bigmenu module.',
    'access arguments' => array(
      'administer bigmenu',
    ),
    'type' => MENU_NORMAL_ITEM,
    'file' => 'bigmenu.admin.inc',
  );
  return $items;
}