You are here

function node_gallery_menu in Node Gallery 6

Same name and namespace in other branches
  1. 6.3 node_gallery.module \node_gallery_menu()
  2. 6.2 node_gallery.module \node_gallery_menu()

Implementation of hook_menu()

File

./node_gallery.module, line 34
Node gallery module file.

Code

function node_gallery_menu() {
  $items = array();
  $items['admin/build/node_gallery'] = array(
    'title' => 'Node Gallery',
    'description' => t('Create and manage your Node Gallery relationships.'),
    'page callback' => 'node_gallery_config_list',
    'access arguments' => array(
      NODE_GALLERY_PERM_ADMIN_GALLERY,
    ),
    'file' => 'node_gallery.admin.inc',
    'type' => MENU_NORMAL_ITEM,
  );
  $items['admin/build/node_gallery/list'] = array(
    'title' => 'List',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['admin/build/node_gallery/add'] = array(
    'title' => 'Add a Gallery Relationship',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'node_gallery_config_form',
    ),
    'access arguments' => array(
      NODE_GALLERY_PERM_ADMIN_GALLERY,
    ),
    'file' => 'node_gallery.admin.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/build/node_gallery/edit/%node_gallery_config'] = array(
    'title' => 'Node Gallery Config Edit',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'node_gallery_config_form',
      4,
    ),
    'access arguments' => array(
      NODE_GALLERY_PERM_ADMIN_GALLERY,
    ),
    'file' => 'node_gallery.admin.inc',
    'type' => MENU_CALLBACK,
  );
  $items['admin/build/node_gallery/delete/%node_gallery_config'] = array(
    'title' => 'Node Gallery Config Delete',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'node_gallery_config_delete_form',
      4,
    ),
    'access arguments' => array(
      NODE_GALLERY_PERM_ADMIN_GALLERY,
    ),
    'file' => 'node_gallery.admin.inc',
    'type' => MENU_CALLBACK,
  );
  $items['galleries'] = array(
    'title' => 'Galleries List',
    'page callback' => 'node_gallery_list',
    'access arguments' => array(
      NODE_GALLERY_PERM_VIEW_GALLERY,
    ),
    'file' => 'node_gallery.pages.inc',
    'type' => MENU_NORMAL_ITEM,
  );
  $items['galleries/%user'] = array(
    'title' => 'My Galleries',
    'title callback' => 'galleries_title',
    'title arguments' => array(
      1,
    ),
    'page callback' => 'node_gallery_list',
    'page arguments' => array(
      1,
    ),
    'access arguments' => array(
      NODE_GALLERY_PERM_VIEW_GALLERY,
    ),
    'file' => 'node_gallery.pages.inc',
    'type' => MENU_NORMAL_ITEM,
  );
  $items['node/%node_gallery_gallery/upload'] = array(
    'title' => 'Upload Images',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'node_gallery_upload_form',
      1,
    ),
    'access callback' => 'node_gallery_user_access',
    'access arguments' => array(
      'upload',
      1,
    ),
    'file' => 'node_gallery.pages.inc',
  );
  $items['node/%node_gallery_gallery/edit/images'] = array(
    'title' => 'Edit Images',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'node_gallery_edit_images_form',
      1,
    ),
    'access callback' => 'node_gallery_user_access',
    'access arguments' => array(
      'edit image',
      1,
    ),
    'file' => 'node_gallery.pages.inc',
  );
  $items['node_gallery/upload/js'] = array(
    'title' => 'Gallery Image Upload',
    'page callback' => 'node_gallery_upload_js',
    'access callback' => TRUE,
    'file' => 'node_gallery.pages.inc',
    'type' => MENU_CALLBACK,
  );
  return $items;
}