You are here

function current_search_set_block_searcher in Facet API 7

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

Sets the block searcher for a configuration.

Parameters

$name: A string containing the machine readable name of the configuration. The name also doubles as the block delta.

$searcher: The machine readable name of the searcher.

2 calls to current_search_set_block_searcher()
current_search_form_block_admin_configure_submit in contrib/current_search/current_search.block.inc
Form submit handler for block configuration form.
current_search_settings_form_submit in contrib/current_search/plugins/export_ui/current_search_export_ui.class.php
Form submission handler for current_search_settings_form().

File

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

Code

function current_search_set_block_searcher($name, $searcher) {

  // Deletes current search data.
  db_delete('block_current_search')
    ->condition('delta', $name)
    ->execute();

  // Inserts new data into database.
  db_insert('block_current_search')
    ->fields(array(
    'delta',
    'searcher',
  ))
    ->values(array(
    'delta' => $name,
    'searcher' => $searcher,
  ))
    ->execute();
}