You are here

function sbp_paths_menu in Search by Page 6

Same name and namespace in other branches
  1. 7 sbp_paths.module \sbp_paths_menu()

Implementation of hook_menu().

Defines a tab on Search by Page environment edit that lists the paths to be indexed, with ability to add, edit, and delete them.

File

./sbp_paths.module, line 196
Module file for Search by Page Paths, a sub-module for Search by Page.

Code

function sbp_paths_menu() {
  $items = array();
  $items['admin/settings/search_by_page/edit/%/paths'] = array(
    'title' => 'Paths',
    'type' => MENU_LOCAL_TASK,
    'weight' => 0,
    'page callback' => '_sbp_paths_list_page',
    'page arguments' => array(
      4,
    ),
    'access arguments' => array(
      'administer search by page',
    ),
  );
  $items['admin/settings/search_by_page/edit/%/paths/edit'] = array(
    'title' => 'Edit path',
    'type' => MENU_CALLBACK,
    'page callback' => '_sbp_paths_edit',
    'page arguments' => array(
      4,
    ),
    'access arguments' => array(
      'administer search by page',
    ),
  );
  $items['admin/settings/search_by_page/edit/%/paths/add'] = array(
    'title' => 'Add path',
    'type' => MENU_CALLBACK,
    'page callback' => '_sbp_paths_edit',
    'page arguments' => array(
      4,
    ),
    'access arguments' => array(
      'administer search by page',
    ),
  );
  $items['admin/settings/search_by_page/edit/%/paths/delete'] = array(
    'title' => 'Delete path',
    'type' => MENU_CALLBACK,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'sbp_paths_delete_confirm',
      4,
    ),
    'access arguments' => array(
      'administer search by page',
    ),
  );
  return $items;
}