You are here

function groupmenu_menu in Group Menu 7

Implements hook_menu().

File

./groupmenu.module, line 34
Integrates menu with Group.

Code

function groupmenu_menu() {
  $items = array();
  $items['group/%/menus'] = array(
    'title' => 'Menus',
    'page callback' => 'groupmenu_overview_page',
    'page arguments' => array(
      1,
    ),
    'access callback' => 'groupmenu_access',
    'access arguments' => array(
      1,
    ),
    'weight' => 10,
    'file' => 'groupmenu.pages.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['group/%/menus/add'] = array(
    'title' => 'Add menu',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'groupmenu_edit_menu_form',
      'add',
      1,
    ),
    'access callback' => 'groupmenu_access',
    'access arguments' => array(
      1,
      'new-menu',
    ),
    'type' => MENU_LOCAL_ACTION,
    'weight' => 1,
    'file' => 'groupmenu.pages.inc',
  );
  $items['group/%/menus/%menu'] = array(
    'title' => 'Customize menu',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'groupmenu_overview_form',
      1,
      3,
    ),
    'access callback' => 'groupmenu_access',
    'access arguments' => array(
      1,
      'list-menu',
      3,
    ),
    'type' => MENU_CALLBACK,
    'weight' => 1,
    'file' => 'groupmenu.pages.inc',
  );
  $items['group/%/menus/%menu/list'] = array(
    'title' => 'List items',
    'weight' => -10,
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['group/%/menus/%menu/add'] = array(
    'title' => 'Add item',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'groupmenu_edit_item_form',
      'add',
      1,
      3,
    ),
    'access callback' => 'groupmenu_access',
    'access arguments' => array(
      1,
      'add-menu-item',
      3,
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 1,
    'file' => 'groupmenu.pages.inc',
  );
  $items['group/%/menus/%menu/edit'] = array(
    'title' => 'Edit menu',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'groupmenu_edit_menu_form',
      'edit',
      1,
      3,
    ),
    'access callback' => 'groupmenu_access',
    'access arguments' => array(
      1,
      'edit-menu',
      3,
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 1,
    'file' => 'groupmenu.pages.inc',
  );
  $items['group/%/menus/%menu/delete'] = array(
    'title' => 'Delete menu',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'groupmenu_delete_menu_confirm',
      3,
      1,
    ),
    'access callback' => 'groupmenu_access',
    'access arguments' => array(
      1,
      'delete-menu',
      3,
    ),
    'type' => MENU_CALLBACK,
    'weight' => 1,
    'file' => 'groupmenu.pages.inc',
  );
  $items['group/%/menus/%menu/item/%menu_link/edit'] = array(
    'title' => 'Edit menu item',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'groupmenu_edit_item_form',
      'edit',
      1,
      3,
      5,
    ),
    'access callback' => 'groupmenu_access',
    'access arguments' => array(
      1,
      'edit-menu-item',
      3,
      5,
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 1,
    'file' => 'groupmenu.pages.inc',
  );
  $items['group/%/menus/%menu/item/%menu_link/delete'] = array(
    'title' => 'Delete menu item',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'groupmenu_delete_item_form',
      5,
      1,
      3,
    ),
    'access callback' => 'groupmenu_access',
    'access arguments' => array(
      1,
      'delete-menu-item',
      3,
      5,
    ),
    'type' => MENU_CALLBACK,
    'weight' => 1,
    'file' => 'groupmenu.pages.inc',
  );
  $items['admin/config/system/groupmenu'] = array(
    'title' => 'Group menu',
    'description' => 'Configure Group menu settings.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'groupmenu_config_form',
    ),
    'access arguments' => array(
      'administer group menu configuration',
    ),
    'file' => 'groupmenu.admin.inc',
  );
  $items['admin/structure/groupmenu'] = array(
    'title' => 'Group menus',
    'description' => 'Administer Group menus on your site, edit, rename and reorganize menu links for specific group menus.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'groupmenu_admin_menu_overview_form',
    ),
    'access callback' => 'user_access',
    'access arguments' => array(
      'administer menu',
    ),
    'type' => MENU_NORMAL_ITEM,
    'file' => 'groupmenu.pages.inc',
  );
  return $items;
}