You are here

function apachesolr_stats_block_view in Apache Solr Statistics 7

Implements hook_block_view().

File

./apachesolr_stats.module, line 979
Keeps and reports statistics about Apache Solr usage and performance.

Code

function apachesolr_stats_block_view($delta) {
  $search_pages = apachesolr_search_load_all_search_pages();
  $links = apachesolr_stats_block_frequent_keywords($delta);
  if ($links) {

    // Return a block array.
    $block = array(
      'subject' => t('Popular searches for @page_name', array(
        '@page_name' => $search_pages[$delta]['label'],
      )),
      'content' => theme('apachesolr_stats_block', array(
        'links' => $links,
      )),
    );
    return $block;
  }
}