You are here

function apachesolr_autocomplete_menu in Apache Solr Autocomplete 7

Same name and namespace in other branches
  1. 6 apachesolr_autocomplete.module \apachesolr_autocomplete_menu()
  2. 7.2 apachesolr_autocomplete.module \apachesolr_autocomplete_menu()

Implementation of hook_menu().

File

./apachesolr_autocomplete.module, line 111
Alters search forms to suggest terms using Apache Solr using AJAX. Thanks to: robertDouglass who contributed some of the code. sch4lly for contributing to D7 version

Code

function apachesolr_autocomplete_menu() {
  $items = array();

  // Pattern is: apachesolr_autocomplete_callback/[context_id]
  $items['apachesolr_autocomplete_callback/%'] = array(
    'page callback' => 'apachesolr_autocomplete_callback',
    'page arguments' => array(
      1,
    ),
    'access callback' => 'user_access',
    'access arguments' => array(
      'search content',
    ),
    'type' => MENU_CALLBACK,
  );
  return $items;
}