You are here

function tft_menu in Taxonomy File Tree 7.2

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

Implementation of hook_menu().

Related topics

File

./tft.module, line 32
Hook implementations and module logic for TFT.

Code

function tft_menu() {
  $menu = array(
    'tft/download/file/%' => array(
      'title' => 'Download',
      'page callback' => 'tft_download_file',
      'page arguments' => array(
        3,
      ),
      'access arguments' => array(
        'access content',
      ),
      'file' => 'includes/tft.pages.inc',
      'type' => MENU_CALLBACK,
    ),
    'tft/%' => array(
      'title' => "Taxonomy File Tree",
      'access arguments' => array(
        TFT_PERM__ACCESS_FULL_TREE,
      ),
      'page callback' => 'tft',
      'page arguments' => array(
        1,
      ),
      'file' => 'includes/tft.pages.inc',
      'type' => MENU_CALLBACK,
    ),
    'tft' => array(
      'title' => "Taxonomy File Tree",
      'page callback' => 'tft',
      'access arguments' => array(
        TFT_PERM__ACCESS_FULL_TREE,
      ),
      'file' => 'includes/tft.pages.inc',
      'type' => MENU_CALLBACK,
    ),
    'tft/term/add' => array(
      'title' => "Add a folder",
      'access callback' => 'tft_term_access',
      'access arguments' => array(
        NULL,
        NULL,
        'add-folder',
      ),
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'tft_add_term_form',
      ),
      'file' => 'includes/tft.pages.inc',
      'type' => MENU_CALLBACK,
    ),
    'tft/term/edit/%' => array(
      'title' => "Edit a folder",
      'access callback' => 'tft_term_access',
      'access arguments' => array(
        3,
        NULL,
        'edit',
      ),
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'tft_edit_term_form',
        3,
      ),
      'file' => 'includes/tft.pages.inc',
      'type' => MENU_CALLBACK,
    ),
    'tft/term/delete/%' => array(
      'title' => "Delete a folder",
      'access callback' => 'tft_term_access',
      'access arguments' => array(
        3,
        NULL,
        'delete',
      ),
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'tft_delete_term_form',
        3,
      ),
      'file' => 'includes/tft.pages.inc',
      'type' => MENU_CALLBACK,
    ),
    'tft/terms/reorder/%' => array(
      'title' => t("Reorder items"),
      'access callback' => 'tft_term_access',
      'access arguments' => array(
        3,
        NULL,
        'reorder',
      ),
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'tft_manage_folders_form',
        3,
      ),
      'file' => 'includes/tft.pages.inc',
    ),
    'tft/ajax/get-folder' => array(
      'title' => "Ajax callback",
      'access callback' => 'tft_term_access',
      'access arguments' => array(
        NULL,
        NULL,
        'view',
      ),
      'page callback' => 'tft_ajax_get_folder',
      'file' => 'includes/tft.ajax.inc',
      'type' => MENU_CALLBACK,
    ),
    'admin/config/media/tft' => array(
      'title' => "Taxonomy File Tree Settings",
      'access arguments' => array(
        TFT_PERM__ADMIN,
      ),
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'tft_settings_form',
      ),
      'file' => 'includes/tft.admin.inc',
    ),
  );
  return $menu;
}