You are here

function data_ui_views_form_submit in Data 6

Same name and namespace in other branches
  1. 7 data_ui/data_ui.admin.inc \data_ui_views_form_submit()

Submit handler for data_ui_views_form().

File

data_ui/data_ui.admin.inc, line 733
Admin UI functions.

Code

function data_ui_views_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 => $handlers) {
      foreach ($handlers as $handler_type => $handler) {
        $meta['fields'][$field_name][$handler_type] = $handler;
      }
    }
  }
  $table
    ->update(array(
    'meta' => $meta,
  ));
  views_invalidate_cache();
}