You are here

function search_api_facetapi_settings in Search API 7

Menu callback for the facet settings page.

1 string reference to 'search_api_facetapi_settings'
search_api_facetapi_menu in contrib/search_api_facetapi/search_api_facetapi.module
Implements hook_menu().

File

contrib/search_api_facetapi/search_api_facetapi.module, line 299
Integrates the Search API with the Facet API.

Code

function search_api_facetapi_settings($realm_name, SearchApiIndex $index) {
  if (!$index->enabled) {
    return array(
      '#markup' => t('Since this index is at the moment disabled, no facets can be activated.'),
    );
  }
  if (!_search_api_facetapi_index_support_feature($index)) {
    return array(
      '#markup' => t('This index uses a server that does not support facet functionality.'),
    );
  }
  $searcher_name = 'search_api@' . $index->machine_name;
  module_load_include('inc', 'facetapi', 'facetapi.admin');
  return drupal_get_form('facetapi_realm_settings_form', $searcher_name, $realm_name);
}