You are here

function data_search_admin_form_submit in Data 8

Same name and namespace in other branches
  1. 6 data_search/data_search.admin.inc \data_search_admin_form_submit()
  2. 7 data_search/data_search.admin.inc \data_search_admin_form_submit()

Submit handler for search form.

File

data_search/data_search.admin.inc, line 46

Code

function data_search_admin_form_submit(&$form, &$form_state) {
  $table = $form['#table'];
  $meta = $table
    ->get('meta');
  if (isset($form_state['values']['fields'])) {
    foreach ($form_state['values']['fields'] as $field_name => $settings) {
      foreach ($settings as $setting => $value) {
        $meta['fields'][$field_name][$setting] = $value;
      }
    }
  }
  $table
    ->update(array(
    'meta' => $meta,
  ));
  views_invalidate_cache();
}