You are here

function facetapi_callback_taxonomy_map in Facet API 6

Maps a taxonomy ID to a term name.

Parameters

$tids: An array containing the term IDs.

Return value

An array mapping the term IDs to the display name.

1 string reference to 'facetapi_callback_taxonomy_map'
facetapi_facetapi_facet_info in ./facetapi.module
Implementation of hook_facetapi_facet_info().

File

./facetapi.callbacks.inc, line 58
Various callbacks referenced in facet definitions.

Code

function facetapi_callback_taxonomy_map(array $tids) {
  $sql = '
    SELECT tid AS id, name
    FROM {term_data}
    WHERE tid IN (!placeholders)
  ';
  return facetapi_map_query($sql, $tids);
}