You are here

function media_gallery_menu in Media Gallery 7.2

Same name and namespace in other branches
  1. 7 media_gallery.module \media_gallery_menu()

Implements hook_menu().

File

./media_gallery.module, line 37

Code

function media_gallery_menu() {
  $items['admin/config/media/galleries'] = array(
    'title' => 'Gallery settings',
    'description' => 'Configure settings for the "All galleries" page.',
    'access arguments' => array(
      'administer media galleries',
    ),
    'page callback' => 'media_gallery_admin_settings',
    'file' => 'media_gallery.admin.inc',
  );
  $items['media-gallery/sort/collection/%taxonomy_term/%'] = array(
    'title' => 'Gallery sort callback',
    'access callback' => 'media_gallery_edit_access_ajax',
    'access arguments' => array(
      'collection',
      3,
      4,
    ),
    'page callback' => 'media_gallery_ajax_sort',
    'page arguments' => array(
      'collection',
      3,
    ),
    'file' => 'media_gallery.pages.inc',
  );
  $items['media-gallery/sort/gallery/%node/%'] = array(
    'title' => 'Gallery sort callback',
    'access callback' => 'media_gallery_edit_access_ajax',
    'access arguments' => array(
      'gallery',
      3,
      4,
    ),
    'page callback' => 'media_gallery_ajax_sort',
    'page arguments' => array(
      'gallery',
      3,
    ),
    'file' => 'media_gallery.pages.inc',
  );
  $items['media-gallery/detail/%media_gallery_mg_node/%media_gallery_mg_item'] = array(
    'page callback' => 'media_gallery_detail_page',
    'page arguments' => array(
      2,
      3,
    ),
    'access callback' => 'media_gallery_view_item_access',
    'access arguments' => array(
      2,
      3,
    ),
    'load arguments' => array(
      2,
    ),
    'file' => 'media_gallery.pages.inc',
  );
  $items['media-gallery/detail/%media_gallery_mg_node/%media_gallery_mg_item/view'] = array(
    'title' => 'View',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
    'load arguments' => array(
      2,
    ),
  );

  // An in-gallery-context version of media/%file/edit.
  $items['media-gallery/detail/%media_gallery_mg_node/%media_gallery_mg_item/edit'] = array(
    'title' => 'Edit file info',
    'page callback' => 'media_gallery_media_page_edit',
    'page arguments' => array(
      2,
      3,
    ),
    'access callback' => 'media_gallery_edit_item_access',
    'access arguments' => array(
      2,
      3,
    ),
    'load arguments' => array(
      2,
    ),
    'weight' => 0,
    'type' => MENU_LOCAL_TASK,
    'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
    'file' => 'media_gallery.pages.inc',
  );
  $items['media-gallery/detail/%media_gallery_mg_node/%media_gallery_mg_item/remove'] = array(
    'title' => 'Remove from gallery',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'media_gallery_remove_item_form',
      2,
      3,
    ),
    'access callback' => 'media_gallery_remove_item_access',
    'access arguments' => array(
      2,
      3,
    ),
    'load arguments' => array(
      2,
    ),
    'type' => MENU_LOCAL_TASK,
    'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
    'file' => 'media_gallery.pages.inc',
  );
  $items['media-gallery/lightbox/%media_gallery_mg_node/%media_gallery_mg_item'] = array(
    'page callback' => 'media_gallery_lightbox_page',
    'page arguments' => array(
      2,
      3,
    ),
    'access callback' => 'media_gallery_view_item_access',
    'access arguments' => array(
      2,
      3,
    ),
    'load arguments' => array(
      2,
    ),
    'file' => 'media_gallery.pages.inc',
    'delivery callback' => 'media_gallery_lightbox_delivery_callback',
  );
  $items['media-gallery/add-images/%node/%'] = array(
    'access callback' => 'media_gallery_edit_access_ajax',
    'access arguments' => array(
      'gallery',
      2,
      3,
    ),
    'page callback' => 'media_gallery_add_images',
    'page arguments' => array(
      2,
    ),
    'file' => 'media_gallery.pages.inc',
  );

  // An in-gallery-context version of media/%media_multi/edit.
  $items['node/%node/multiedit'] = array(
    'title' => 'Edit media',
    'page callback' => 'media_gallery_media_page_multiedit',
    'page arguments' => array(
      1,
    ),
    'access callback' => 'media_gallery_multiedit_access',
    'access arguments' => array(
      1,
    ),
    'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
    'type' => MENU_LOCAL_TASK,
    'file' => 'media_gallery.pages.inc',
  );

  // @todo Move to Media module once it is ready.
  $items['media/%file/download'] = array(
    'title' => 'Download',
    'page callback' => 'media_download',
    'page arguments' => array(
      1,
    ),
    'access callback' => 'file_entity_access',
    'access arguments' => array(
      'view',
      1,
    ),
    'type' => MENU_CALLBACK,
    'file' => 'media.pages.inc',
  );
  return $items;
}