You are here

function scanner_menu in Search and Replace Scanner 7

Same name and namespace in other branches
  1. 5.2 scanner.module \scanner_menu()
  2. 6 scanner.module \scanner_menu()

Implements hook_menu().

File

./scanner.module, line 22
Search and Replace Scanner - works on all nodes text content.

Code

function scanner_menu() {
  $items['admin/content/scanner'] = array(
    'title' => 'Search and Replace Scanner',
    'description' => 'Find (and replace) keywords in all your content.',
    'page callback' => 'scanner_view',
    'type' => MENU_LOCAL_TASK | MENU_NORMAL_ITEM,
    'access arguments' => array(
      'perform search',
    ),
  );
  $items['admin/content/scanner/scan'] = array(
    'title' => 'Search',
    'access arguments' => array(
      'perform search',
    ),
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['admin/content/scanner/scan/confirm'] = array(
    'title' => 'Confirm Replace',
    'access arguments' => array(
      'perform search and replace',
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'scanner_confirm_form',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['admin/content/scanner/undo'] = array(
    'title' => 'Undo',
    'page callback' => 'scanner_undo_page',
    'access arguments' => array(
      'perform search and replace',
    ),
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/content/scanner/undo/confirm'] = array(
    'title' => 'Confirm Undo',
    'access arguments' => array(
      'perform search and replace',
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'scanner_undo_confirm_form',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['admin/config/content/scanner'] = array(
    'title' => 'Search and Replace Scanner',
    'description' => 'Configure defaults and what fields can be searched and replaced.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'scanner_admin_form',
    ),
    'access arguments' => array(
      'administer scanner settings',
    ),
    'file' => 'scanner.admin.inc',
  );
  return $items;
}