You are here

function apachesolr_suppress_blocks in Apache Solr Search 6.3

Same name and namespace in other branches
  1. 8 apachesolr.module \apachesolr_suppress_blocks()
  2. 7 apachesolr.module \apachesolr_suppress_blocks()

Semaphore that indicates whether Blocks should be suppressed regardless of whether a search has run.

Parameters

$suppress: A boolean indicating whether to suppress.

Return value

TRUE if a search has been executed. FALSE otherwise.

3 calls to apachesolr_suppress_blocks()
ApacheSolrFacetapiAdapter::suppressOutput in plugins/facetapi/adapter.inc
apachesolr_search_block_view in ./apachesolr_search.module
Vew a specific block according to the delta identifier
apachesolr_search_search_results in ./apachesolr_search.module

File

./apachesolr.module, line 1074
Integration with the Apache Solr search application.

Code

function apachesolr_suppress_blocks($env_id, $suppress = NULL) {
  static $_suppress = FALSE;
  if (is_bool($suppress)) {
    $_suppress[$env_id] = $suppress;
  }

  // Return false if the search environment is not available in our array
  if (!isset($_suppress[$env_id])) {
    return FALSE;
  }
  return $_suppress[$env_id];
}