function feeds_ui_importer_import_submit in Feeds 7.2
Form submission handler for feeds_ui_importer_import().
See also
feeds_ui_importer_import_validate()
File
- feeds_ui/
feeds_ui.admin.inc, line 1246 - Contains all page callbacks, forms and theming functions for Feeds administrative pages.
Code
function feeds_ui_importer_import_submit($form, &$form_state) {
$importer = $form_state['importer'];
// Create a copy of the importer to preserve config.
$save = feeds_importer($importer->id);
$save
->setConfig($importer->config);
foreach (array(
'fetcher',
'parser',
'processor',
) as $type) {
$save
->setPlugin($importer->config[$type]['plugin_key']);
$save->{$type}
->setConfig($importer->config[$type]['config']);
}
$save
->save();
drupal_set_message(t('Successfully imported the %id feeds importer.', array(
'%id' => $importer->id,
)));
$form_state['redirect'] = 'admin/structure/feeds';
}