You are here

function apachesolr_search_menu in Apache Solr Search 8

Same name and namespace in other branches
  1. 5.2 apachesolr_search.module \apachesolr_search_menu()
  2. 6.3 apachesolr_search.module \apachesolr_search_menu()
  3. 6 apachesolr_search.module \apachesolr_search_menu()
  4. 6.2 apachesolr_search.module \apachesolr_search_menu()
  5. 7 apachesolr_search.module \apachesolr_search_menu()

Implements hook_menu().

File

./apachesolr_search.module, line 94
Provides a content search implementation for node content for use with the Apache Solr search application.

Code

function apachesolr_search_menu() {
  $items['admin/config/search/apachesolr/search-pages'] = array(
    'title' => 'Pages/Blocks',
    'description' => 'Configure search pages',
    'page callback' => 'apachesolr_search_page_list_all',
    'access arguments' => array(
      'administer search',
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'apachesolr_search.admin.inc',
  );
  $items['admin/config/search/apachesolr/search-pages/add'] = array(
    'title' => 'Add search page',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'apachesolr_search_page_settings_form',
    ),
    'access arguments' => array(
      'administer search',
    ),
    'type' => MENU_LOCAL_ACTION,
    'weight' => 1,
    'file' => 'apachesolr_search.admin.inc',
  );
  $items['admin/config/search/apachesolr/search-pages/%apachesolr_search_page/edit'] = array(
    'title' => 'Edit search page',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'apachesolr_search_page_settings_form',
      5,
    ),
    'access arguments' => array(
      'administer search',
    ),
    'file' => 'apachesolr_search.admin.inc',
  );
  $items['admin/config/search/apachesolr/search-pages/%apachesolr_search_page/delete'] = array(
    'title' => 'Delete search page',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'apachesolr_search_delete_search_page_confirm',
      5,
    ),
    'access arguments' => array(
      'administer search',
    ),
    'file' => 'apachesolr_search.admin.inc',
  );
  $items['admin/config/search/apachesolr/search-pages/%apachesolr_search_page/clone'] = array(
    'title' => 'Clone search page',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'apachesolr_search_clone_search_page_confirm',
      5,
    ),
    'access arguments' => array(
      'administer search',
    ),
    'file' => 'apachesolr_search.admin.inc',
  );
  $items['admin/config/search/apachesolr/search-pages/addblock'] = array(
    'title' => 'Add search block "More Like This"',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'apachesolr_search_mlt_add_block_form',
    ),
    'access arguments' => array(
      'administer search',
    ),
    'type' => MENU_LOCAL_ACTION,
    'weight' => 2,
    'file' => 'apachesolr_search.admin.inc',
  );
  $items['admin/config/search/apachesolr/search-pages/block/%apachesolr_search_mlt_block/delete'] = array(
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'apachesolr_search_mlt_delete_block_form',
      6,
    ),
    'access arguments' => array(
      'administer search',
    ),
    'file' => 'apachesolr_search.admin.inc',
    'type' => MENU_CALLBACK,
  );

  // Environment specific settings
  $settings_path = 'admin/config/search/apachesolr/settings/';
  $items[$settings_path . '%apachesolr_environment/bias'] = array(
    'title' => 'Bias',
    'page callback' => 'apachesolr_bias_settings_page',
    'page arguments' => array(
      5,
    ),
    'access arguments' => array(
      'administer search',
    ),
    'weight' => 4,
    'type' => MENU_LOCAL_TASK,
    'file' => 'apachesolr_search.admin.inc',
  );
  return $items;
}