You are here

function better_search_update_8001 in Better Search Block 8

Implements hook_update_N().

File

./better_search.install, line 11
Better Search Install File.

Code

function better_search_update_8001(&$sandbox) {
  $config_factory = \Drupal::configFactory();
  $config = $config_factory
    ->getEditable('better_search.settings');
  $config
    ->set('searchpage_enable', TRUE);
  $config
    ->set('searchpage_submit_not_visible', TRUE);
  $message = "Better Search Blocks enabled on search page and submit button is visually hidden";
  $config
    ->save(TRUE);
  return $message;
}