You are here

function flag_menu in Flag 6

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

Implementation of hook_menu().

File

./flag.module, line 13

Code

function flag_menu() {
  $items = array();
  $items['admin/build/flags'] = array(
    'title' => 'Flags',
    'page callback' => 'flag_admin_page',
    'access callback' => 'user_access',
    'access arguments' => array(
      'administer flags',
    ),
    'description' => 'Configure flags for marking content with arbitary information (such as <em>offensive</em> or <em>bookmarked</em>).',
    'file' => 'includes/flag.admin.inc',
    'type' => MENU_NORMAL_ITEM,
  );
  $items['admin/build/flags/edit'] = array(
    'title' => 'Edit flags',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'flag_form',
    ),
    'access callback' => 'user_access',
    'access arguments' => array(
      'administer flags',
    ),
    'file' => 'includes/flag.admin.inc',
    'type' => MENU_CALLBACK,
  );
  $items['admin/build/flags/delete'] = array(
    'title' => 'Delete flags',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'flag_delete_confirm',
    ),
    'access callback' => 'user_access',
    'access arguments' => array(
      'administer flags',
    ),
    'file' => 'includes/flag.admin.inc',
    'type' => MENU_CALLBACK,
  );
  $items['admin/build/flags/list'] = array(
    'title' => 'List',
    'page callback' => 'flag_admin_page',
    'access callback' => 'user_access',
    'access arguments' => array(
      'administer flags',
    ),
    'file' => 'includes/flag.admin.inc',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -1,
  );
  $items['admin/build/flags/add'] = array(
    'title' => 'Add',
    'page callback' => 'flag_add_page',
    'access callback' => 'user_access',
    'access arguments' => array(
      'administer flags',
    ),
    'file' => 'includes/flag.admin.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['flag'] = array(
    'title' => 'Flag',
    'page callback' => 'flag_page',
    'access callback' => 'user_access',
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['flag/confirm'] = array(
    'title' => 'Flag confirm',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'flag_confirm',
    ),
    'access callback' => 'user_access',
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_CALLBACK,
  );
  return $items;
}