You are here

function apachesolr_search_block_info in Apache Solr Search 7

Same name and namespace in other branches
  1. 8 apachesolr_search.module \apachesolr_search_block_info()
  2. 6.3 apachesolr_search.module \apachesolr_search_block_info()

Implements hook_block_info().

File

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

Code

function apachesolr_search_block_info() {

  // Get all of the moreLikeThis blocks that the user has created
  $blocks = apachesolr_search_load_all_mlt_blocks();
  foreach ($blocks as $delta => $settings) {
    $blocks[$delta] += array(
      'info' => t('Apache Solr recommendations: !name', array(
        '!name' => $settings['name'],
      )),
      'cache' => DRUPAL_CACHE_PER_PAGE,
    );
  }

  // Add the sort block.
  $blocks['sort'] = array(
    'info' => t('Apache Solr Core: Sorting'),
    'cache' => DRUPAL_NO_CACHE,
  );
  return $blocks;
}