You are here

function theme_search_api_stats_block in Search API Stats 7

@file search_api_stats_block.theme.inc

1 theme call to theme_search_api_stats_block()
_search_api_stats_block_show_keywords in contrib/search_api_stats_block/search_api_stats_block.module
Responsible for querying the database and generating the list of phrases.

File

contrib/search_api_stats_block/search_api_stats_block.theme.inc, line 7
search_api_stats_block.theme.inc

Code

function theme_search_api_stats_block($vars) {
  $links = array();
  $attributes = array(
    'class' => array(
      'search-api-stats-top-phrases',
    ),
  );
  foreach ($vars['phrases'] as $key => $phrase) {
    $links[$key] = array(
      'title' => $key,
      'href' => $vars['path'],
      'query' => array(
        $vars['param_name'] => $key,
      ),
    );
  }
  return theme('links', array(
    'links' => $links,
    'attributes' => $attributes,
  ));
}