You are here

function bulk_export_export_form_submit in Chaos Tool Suite (ctools) 7

Same name and namespace in other branches
  1. 6 bulk_export/bulk_export.module \bulk_export_export_form_submit()

Process the bulk export submit form and make the results available.

1 call to bulk_export_export_form_submit()
bulk_export_export in bulk_export/bulk_export.module
FAPI gateway to the bulk exporter.

File

bulk_export/bulk_export.module, line 263
Perform bulk exports.

Code

function bulk_export_export_form_submit($form, &$form_state) {
  $code = array();
  $name = empty($form_state['values']['name']) ? 'foo' : $form_state['values']['name'];
  $tables = $form_state['values']['tables'];
  foreach ($tables as $table) {
    $names = array_keys(array_filter($form_state['values'][$table]));
    if ($names) {
      natcasesort($names);
      ctools_export_to_hook_code($code, $table, $names, $name);
    }
  }
  $form_state['code'] = $code;
  $form_state['module'] = $name;
}