You are here

function search_api_spellcheck_theme in Search API Spellcheck 7

Same name and namespace in other branches
  1. 8.3 search_api_spellcheck.module \search_api_spellcheck_theme()

Implements hook_theme().

File

./search_api_spellcheck.module, line 12
A common interface for search services to suggest spellings

Code

function search_api_spellcheck_theme($existing, $type, $theme, $path) {
  $path = drupal_get_path('module', 'search_api_spellcheck') . '/theme';
  $themes['search_api_spellcheck'] = array(
    'variables' => array(
      'spellcheck' => NULL,
      'options' => array(),
    ),
    // theme function is in an include
    'file' => 'theme/search_api_spellcheck.theme.inc',
  );
  $themes['search_api_spellcheck_single_suggestion'] = array(
    'variables' => array(
      'suggestion' => NULL,
    ),
    'template' => 'search-api-spellcheck-single-suggestion',
    'path' => $path,
  );
  $themes['search_api_spellcheck_multiple_suggestions'] = array(
    'variables' => array(
      'suggestions' => array(),
    ),
    'template' => 'search-api-spellcheck-multiple-suggestions',
    'path' => $path,
  );
  return $themes;
}