function current_search_get_block_searcher in Facet API 7
Same name and namespace in other branches
- 7.2 contrib/current_search/current_search.block.inc \current_search_get_block_searcher()
Gets the searcher associated with the delta.
Parameters
string $delta: The block delta.
Return value
string The machine name of the searcher associated with the block.
2 calls to current_search_get_block_searcher()
- current_search_block_view in contrib/
current_search/ current_search.block.inc - Returns the content for a facet based on the delta.
- current_search_check_visibility in contrib/
current_search/ current_search.block.inc - Checks whether the block should be displayed.
File
- contrib/
current_search/ current_search.block.inc, line 208 - Block hook implementations and block form alterations.
Code
function current_search_get_block_searcher($delta) {
$map =& drupal_static('current_search_delta_map');
if (NULL === $map) {
$map = array();
$result = db_query('SELECT delta, searcher FROM {block_current_search}');
foreach ($result as $record) {
$map[$record->delta] = $record->searcher;
}
}
if (!isset($map[$delta])) {
$map[$delta] = current_search_get_default_searcher();
}
return $map[$delta];
}