You are here

function tft_menu in Taxonomy File Tree 7

Same name and namespace in other branches
  1. 7.2 tft.module \tft_menu()

Implementation of hook_menu().

File

./tft.module, line 79
Module hooks.

Code

function tft_menu() {
  $menu = array(
    'tft/download/file/%' => array(
      'title' => 'Download',
      'page callback' => '_tft_download_the_file',
      'page arguments' => array(
        3,
      ),
      'access arguments' => array(
        'access content',
      ),
      'type' => MENU_CALLBACK,
    ),
    'tft/%' => array(
      'title' => "Taxonomy File Tree",
      'access callback' => 'tft_menu_access',
      'access arguments' => array(
        TFT_ACCESS_FULL_TREE,
      ),
      'page callback' => 'tft',
      'page arguments' => array(
        1,
      ),
      'file' => 'tft.pages.inc',
      'type' => MENU_CALLBACK,
    ),
    'tft' => array(
      'title' => "Taxonomy File Tree",
      'page callback' => 'tft',
      'access arguments' => array(
        TFT_ACCESS_FULL_TREE,
      ),
      'file' => 'tft.pages.inc',
      'type' => MENU_CALLBACK,
    ),
    'node/%/tft' => array(
      'title' => "Files",
      'access callback' => 'og_user_access',
      'access arguments' => array(
        'node',
        1,
        TFT_ACCESS_FULL_TREE,
      ),
      'page callback' => 'tft_og',
      'page arguments' => array(
        1,
      ),
      'file' => 'tft.pages.inc',
      'type' => MENU_CALLBACK,
    ),
    'tft/term/add' => array(
      'title' => "Add a folder",
      'access callback' => 'tft_menu_access',
      'access arguments' => array(
        TFT_ADD_TERMS,
      ),
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'tft_add_term_form',
      ),
      'file' => 'tft.admin.inc',
      'type' => MENU_CALLBACK,
    ),
    'tft/term/edit/%' => array(
      'title' => "Edit a folder",
      'access callback' => 'tft_menu_access',
      'access arguments' => array(
        TFT_ADD_TERMS,
      ),
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'tft_edit_term_form',
        3,
      ),
      'file' => 'tft.admin.inc',
      'type' => MENU_CALLBACK,
    ),
    'tft/term/delete/%' => array(
      'title' => "Delete a folder",
      'access callback' => 'tft_menu_access',
      'access arguments' => array(
        TFT_DELETE_TERMS,
      ),
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'tft_delete_term_form',
        3,
      ),
      'file' => 'tft.admin.inc',
      'type' => MENU_CALLBACK,
    ),
    'tft/term/archive/%' => array(
      'title' => "Archive a folder",
      'access callback' => 'tft_menu_access',
      'access arguments' => array(
        TFT_ARCHIVE_TERMS,
      ),
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'tft_archive_term_form',
        3,
      ),
      'file' => 'tft.admin.inc',
      'type' => MENU_CALLBACK,
    ),
    'node/%/tft/term/restore/%' => array(
      'title' => "Restore a file",
      'access callback' => 'tft_menu_access',
      'access arguments' => array(
        TFT_ARCHIVE_TERMS,
      ),
      'page callback' => 'tft_restore_element',
      'page arguments' => array(
        1,
        5,
        'term',
      ),
      'type' => MENU_CALLBACK,
    ),
    'tft/file/archive/%' => array(
      'title' => "Archive a file",
      'access callback' => 'tft_menu_access',
      'access arguments' => array(
        TFT_ARCHIVE_TERMS,
      ),
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'tft_archive_file_form',
        3,
      ),
      'file' => 'tft.admin.inc',
      'type' => MENU_CALLBACK,
    ),
    'node/%/tft/file/restore/%' => array(
      'title' => "Restore a file",
      'access callback' => 'tft_menu_access',
      'access arguments' => array(
        TFT_ARCHIVE_TERMS,
      ),
      'page callback' => 'tft_restore_element',
      'page arguments' => array(
        1,
        5,
        'node',
      ),
      'type' => MENU_CALLBACK,
    ),
    'tft/terms/reorder/%' => array(
      'title' => t("Reorder folders"),
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'tft_manage_folders_form',
        3,
      ),
      'access arguments' => array(
        TFT_REORDER_TERMS,
      ),
      'file' => 'tft.admin.inc',
    ),
    'tft/ajax/get-folder' => array(
      'title' => "Ajax callback",
      'access callback' => 'tft_menu_access',
      'access arguments' => array(
        'access content',
      ),
      // @todo
      'page callback' => 'tft_ajax_get_folder',
      'file' => 'tft.ajax.inc',
      'type' => MENU_CALLBACK,
    ),
    'admin/config/media/tft' => array(
      'title' => "Taxonomy File Tree Settings",
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'tft_settings_form',
      ),
      'access arguments' => array(
        TFT_ADMIN,
      ),
      'file' => 'tft.admin.inc',
    ),
  );
  return $menu;
}