function apachesolr_stats_block_info in Apache Solr Statistics 7
Implements hook_block_info().
File
- ./
apachesolr_stats.module, line 956 - Keeps and reports statistics about Apache Solr usage and performance.
Code
function apachesolr_stats_block_info() {
$search_pages = apachesolr_search_load_all_search_pages();
$enabled_search_pages = variable_get('apachesolr_stats_enabled', array());
$blocks = array();
// Default block settings.
foreach ($enabled_search_pages as $page_id) {
if ($page_id) {
$blocks[$page_id] = array(
'info' => t('Apache Solr Statistics: popular searches for @page_id page', array(
'@page_id' => $search_pages[$page_id]['label'],
)),
// Start out disabled
'status' => 0,
'region' => 'right',
// Should be cached equally across paths and roles.
'cache' => DRUPAL_CACHE_GLOBAL,
);
}
}
return $blocks;
}