You are here

function node_import_menu in Node import 6

Same name and namespace in other branches
  1. 5 node_import.module \node_import_menu()

Implementation of hook_menu().

File

./node_import.module, line 18
Let users import content from CSV or TSV file.

Code

function node_import_menu() {
  $items = array();
  $items['admin/content/node_import'] = array(
    'title' => 'Import content',
    'description' => 'Import content from a <abbr title="Comma Separated Values">CSV</abbr> or <abbr title="Tab Separated Values">TSV</abbr> file.',
    'access callback' => 'user_access',
    'access arguments' => array(
      'import content',
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'node_import_list_tasks_form',
    ),
    'file' => 'node_import.admin.inc',
  );
  $items['admin/content/node_import/list'] = array(
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
    'title' => 'List',
  );
  $items['admin/content/node_import/list/tasks'] = array(
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
    'title' => 'Tasks',
  );
  $items['admin/content/node_import/list/files'] = array(
    'type' => MENU_LOCAL_TASK,
    'title' => 'Files',
    'access callback' => 'user_access',
    'access arguments' => array(
      'import content',
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'node_import_list_files_form',
    ),
    'file' => 'node_import.admin.inc',
  );
  $items['admin/content/node_import/add'] = array(
    'type' => MENU_LOCAL_TASK,
    'title' => 'New import',
    'access callback' => 'user_access',
    'access arguments' => array(
      'import content',
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'node_import_add_form',
    ),
    'file' => 'node_import.admin.inc',
  );
  $items['admin/content/node_import/settings'] = array(
    'type' => MENU_LOCAL_TASK,
    'title' => 'Settings',
    'weight' => 10,
    'access callback' => 'user_access',
    'access arguments' => array(
      'administer imports',
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'node_import_settings_form',
    ),
    'file' => 'node_import.admin.inc',
  );
  $items['admin/content/node_import/%node_import'] = array(
    'type' => MENU_CALLBACK,
    'title' => 'Importing...',
    'access callback' => 'node_import_access',
    'access arguments' => array(
      3,
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'node_import_view_form',
      3,
    ),
    'file' => 'node_import.admin.inc',
  );
  $items['admin/content/node_import/%node_import/view'] = array(
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'title' => 'View',
    'weight' => -10,
  );
  $items['admin/content/node_import/%node_import/continue'] = array(
    'type' => MENU_CALLBACK,
    'title' => 'Continue import',
    'access callback' => 'node_import_access',
    'access arguments' => array(
      3,
    ),
    'page callback' => 'node_import_js',
    'page arguments' => array(
      3,
    ),
    'file' => 'node_import.inc',
  );
  $items['admin/content/node_import/%node_import/debug'] = array(
    'type' => MENU_CALLBACK,
    'title' => 'Debug report',
    'access callback' => 'node_import_access',
    'access arguments' => array(
      3,
    ),
    'page callback' => 'node_import_debug_report',
    'page arguments' => array(
      3,
    ),
    'file' => 'node_import.admin.inc',
  );
  $items['admin/content/node_import/%node_import/delete'] = array(
    'type' => MENU_LOCAL_TASK,
    'title' => 'Delete',
    'weight' => 10,
    'access callback' => 'node_import_access',
    'access arguments' => array(
      3,
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'node_import_delete_form',
      3,
    ),
    'file' => 'node_import.admin.inc',
  );

  //TODO: %node_import/clone ? %node_import/edit ?
  return $items;
}