You are here

function search_api_glossary_getter_helper in Search API AZ Glossary 7

Same name and namespace in other branches
  1. 7.3 search_api_glossary.module \search_api_glossary_getter_helper()
  2. 7.2 search_api_glossary.module \search_api_glossary_getter_helper()

Getter Helper for Alpha Numeric Keys.

2 calls to search_api_glossary_getter_helper()
search_api_glossary_search_api_solr_documents_alter in ./search_api_glossary.module
Alter Solr documents before they are sent to Solr for indexing.
search_api_glossary_title_getter_callback in ./search_api_glossary.module
Getter callback for title_az_glossary property.

File

./search_api_glossary.module, line 143
Search api glossary module file.

Code

function search_api_glossary_getter_helper($first_letter) {

  // Is it alpha?
  if (ctype_alpha($first_letter)) {
    $key = $first_letter;
  }
  elseif (ctype_digit($first_letter)) {
    $key = "0-9";
  }
  else {
    $key = "#";
  }
  return $key;
}