You are here

function theme_apachesolr_search_mlt_recommendation_block in Apache Solr Search 7

Same name and namespace in other branches
  1. 8 apachesolr_search.module \theme_apachesolr_search_mlt_recommendation_block()
  2. 6.3 apachesolr_search.module \theme_apachesolr_search_mlt_recommendation_block()
1 theme call to theme_apachesolr_search_mlt_recommendation_block()
apachesolr_search_block_view in ./apachesolr_search.module
Implements hook_block_view().

File

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

Code

function theme_apachesolr_search_mlt_recommendation_block($vars) {
  $docs = $vars['docs'];
  $links = array();
  foreach ($docs as $result) {

    // Suitable for single-site mode. Label is already safe.
    $links[] = l($result->label, $result->path, array(
      'html' => TRUE,
    ));
  }
  $links = array(
    '#theme' => 'item_list',
    '#items' => $links,
  );
  return render($links);
}