You are here

function search_api_glossary_title_getter_callback in Search API AZ Glossary 7

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

Getter callback for title_az_glossary property.

1 string reference to 'search_api_glossary_title_getter_callback'
search_api_glossary_entity_property_info in ./search_api_glossary.module
Implements hook_entity_property_info().

File

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

Code

function search_api_glossary_title_getter_callback($node, $name) {

  // @TODO: remove hardcoded node title field and expose this as a setting.
  $first_letter = strtoupper($node->title[0]);
  $key = search_api_glossary_getter_helper($first_letter);
  return $key;
}