You are here

function current_search_block_info in Facet API 7

Same name and namespace in other branches
  1. 6.3 contrib/current_search/current_search.block.inc \current_search_block_info()
  2. 7.2 contrib/current_search/current_search.block.inc \current_search_block_info()

Implements hook_block_info().

File

contrib/current_search/current_search.block.inc, line 59
Block hook implementations and block form alterations.

Code

function current_search_block_info() {
  $blocks = array();

  // Loads settings for enabled facets.
  ctools_include('export');
  foreach (ctools_export_crud_load_all('current_search') as $config) {
    if (empty($config->disabled)) {
      $blocks[$config->name] = array(
        'info' => 'Current search: ' . $config->label,
        'cache' => DRUPAL_NO_CACHE,
      );
    }
  }

  // Returns available blocks.
  return $blocks;
}