You are here

function og_menu_menu in Organic Groups Menu (OG Menu) 6

Same name and namespace in other branches
  1. 5 og_menu.module \og_menu_menu()
  2. 6.2 og_menu.module \og_menu_menu()
  3. 7.3 og_menu.module \og_menu_menu()
  4. 7.2 og_menu.module \og_menu_menu()

Implementation of hook_menu().

File

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

Code

function og_menu_menu() {
  $items = array();
  $items['node/%node/og_menu'] = array(
    'title' => 'Menus',
    'page callback' => 'og_menu_overview_page',
    'page arguments' => array(
      1,
    ),
    'access callback' => 'og_menu_access',
    'access arguments' => array(
      1,
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 10,
  );
  $items['node/%node/og_menu/list'] = array(
    'title' => 'List menus',
    'weight' => -10,
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['node/%node/og_menu/add'] = array(
    'title' => 'Add menu',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'og_menu_edit_menu_form',
      'add',
    ),
    'access callback' => 'og_menu_access',
    'access arguments' => array(
      1,
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 1,
  );
  $items['node/%node/og_menu/%menu'] = array(
    'title' => 'Customize menu',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'og_menu_overview_form',
      1,
      3,
    ),
    'access callback' => 'og_menu_access',
    'access arguments' => array(
      1,
      3,
    ),
    'type' => MENU_CALLBACK,
    'weight' => 1,
  );
  $items['node/%node/og_menu/%menu/list'] = array(
    'title' => 'List items',
    'weight' => -10,
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['node/%node/og_menu/%menu/add'] = array(
    'title' => 'Add item',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'og_menu_edit_item_form',
      'add',
      NULL,
      3,
    ),
    'access callback' => 'og_menu_access',
    'access arguments' => array(
      1,
      3,
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 1,
  );
  $items['node/%node/og_menu/%menu/edit'] = array(
    'title' => 'Edit menu',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'og_menu_edit_menu_form',
      'edit',
      3,
    ),
    'access callback' => 'og_menu_access',
    'access arguments' => array(
      1,
      3,
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 1,
  );
  $items['node/%node/og_menu/%menu/delete'] = array(
    'title' => 'Delete menu',
    'page callback' => 'og_menu_delete_menu_page',
    'page arguments' => array(
      3,
    ),
    'access callback' => 'og_menu_access',
    'access arguments' => array(
      1,
      3,
    ),
    'type' => MENU_CALLBACK,
    'weight' => 1,
  );
  $items['node/%node/og_menu/%menu/item/%menu_link/edit'] = array(
    'title' => 'Edit menu item',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'og_menu_edit_item_form',
      'edit',
      4,
      NULL,
    ),
    'access callback' => 'og_menu_access',
    'access arguments' => array(
      1,
      3,
    ),
    'type' => MENU_CALLBACK,
    'weight' => 1,
  );
  $items['node/%node/og_menu/%menu/item/%menu_link/delete'] = array(
    'title' => 'Delete menu item',
    'page callback' => 'og_menu_delete_item_page',
    'page arguments' => array(
      4,
    ),
    'access callback' => 'og_menu_access',
    'access arguments' => array(
      1,
      3,
    ),
    'type' => MENU_CALLBACK,
    'weight' => 1,
  );
  return $items;
}