You are here

function node_gallery_menu in Node Gallery 6.2

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

Implementation of hook_menu().

File

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

Code

function node_gallery_menu() {
  $items = array();
  $items['admin/settings/node_gallery'] = array(
    'title' => 'Node Gallery',
    'description' => '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/settings/node_gallery/list'] = array(
    'title' => 'List',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['admin/settings/node_gallery/settings'] = array(
    'title' => 'Common Settings',
    'description' => "Manage node gallery's common settings.",
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'node_gallery_settings_form',
    ),
    'access arguments' => array(
      NODE_GALLERY_PERM_ADMIN_GALLERY,
    ),
    'file' => 'node_gallery.admin.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/settings/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/settings/node_gallery/edit/%node_gallery_config'] = array(
    'title' => 'Node Gallery - Edit Configuration',
    '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/settings/node_gallery/delete/%node_gallery_config'] = array(
    'title' => 'Node Gallery - Delete Configuration',
    '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' => 'Gallery 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_uid_optional'] = array(
    'title' => 'My Galleries',
    'title callback' => 'node_gallery_list_title',
    'title arguments' => array(
      1,
    ),
    'page callback' => 'node_gallery_list',
    'page arguments' => array(
      1,
    ),
    'access callback' => 'node_gallery_user_access',
    'access arguments' => array(
      'view My Galleries',
      NULL,
      1,
    ),
    'file' => 'node_gallery.pages.inc',
    'type' => MENU_NORMAL_ITEM,
  );
  $items['galleries/%user/%node_gallery_config'] = array(
    'title' => 'My Galleries',
    'title callback' => 'node_gallery_list_title',
    'title arguments' => array(
      1,
      2,
    ),
    'page callback' => 'node_gallery_list',
    'page arguments' => array(
      1,
      2,
    ),
    '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',
    'type' => MENU_LOCAL_TASK,
  );
  $items['node/%node_gallery_gallery/images'] = array(
    'title' => 'Manage 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',
    'type' => MENU_LOCAL_TASK,
  );
  $items['node/%node_gallery_gallery/sort'] = array(
    'title' => 'Sort Images',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'node_gallery_sort_images_form',
      1,
    ),
    'access callback' => 'node_gallery_user_access',
    'access arguments' => array(
      'edit image',
      1,
    ),
    'file' => 'node_gallery.pages.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $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;
}