You are here

function facetapi_get_delta_map_queue in Facet API 7.2

Same name and namespace in other branches
  1. 6.3 facetapi.block.inc \facetapi_get_delta_map_queue()
  2. 7 facetapi.block.inc \facetapi_get_delta_map_queue()

Returns facets that are enabled or whose delta mapping is forced.

Parameters

$searcher: The machine readable name of the searcher.

$realm_name: The machine readable name of the realm.

Return value

array A list of machine readable facet names.

2 calls to facetapi_get_delta_map_queue()
facetapi_get_block_info in ./facetapi.block.inc
Helper function to get block info for all block-like realms.
facetapi_get_delta_map in ./facetapi.block.inc
Returns a cached delta map of hashes to names.

File

./facetapi.block.inc, line 296
Block realm code and hook implementations.

Code

function facetapi_get_delta_map_queue($searcher, $realm_name) {
  static $forced;
  if (NULL === $forced) {
    $forced = module_invoke_all('facetapi_force_delta_mapping');
  }
  $enabled = array_keys(facetapi_get_enabled_facets($searcher, $realm_name));
  if (!isset($forced[$searcher][$realm_name])) {
    $forced[$searcher][$realm_name] = array();
  }

  // Merges enabled facets and facets whose mapping is forced.
  return array_unique(array_merge($enabled, $forced[$searcher][$realm_name]));
}