You are here

function apachesolr_search_get_type in Apache Solr Search 6.2

Same name and namespace in other branches
  1. 5.2 apachesolr_search.module \apachesolr_search_get_type()
  2. 6.3 apachesolr_search.module \apachesolr_search_get_type()
  3. 6 apachesolr_search.module \apachesolr_search_get_type()

Callback function for the 'Filter by type' facet block.

1 call to apachesolr_search_get_type()
apachesolr_search_process_response in ./apachesolr_search.module
1 string reference to 'apachesolr_search_get_type'
apachesolr_search_block in ./apachesolr_search.module
Implementation of hook_block().

File

./apachesolr_search.module, line 1118
Provides a content search implementation for node content for use with the Apache Solr search application.

Code

function apachesolr_search_get_type($facet) {
  $type = node_get_types('name', $facet);
  if ($type === FALSE && $facet == 'comment') {
    $type = t('Comment');
  }

  // A disabled or missing node type returns FALSE.
  $name = $type === FALSE ? $facet : $type;
  return apachesolr_tt("nodetype:type:{$facet}:name", $name);
}