function migrate_ui_edit_mappings_revert in Migrate 7.2
Revert callback for the edit mappings form. Remove any field mappings that were defined through the UI.
_state
Parameters
$form:
1 string reference to 'migrate_ui_edit_mappings_revert'
- migrate_ui_edit_mappings in migrate_ui/
migrate_ui.pages.inc - Page callback to edit field mappings for a given migration.
File
- migrate_ui/
migrate_ui.pages.inc, line 1546 - Pages for managing migration processes.
Code
function migrate_ui_edit_mappings_revert(&$form, &$form_state) {
$machine_name = $form_state['values']['machine_name'];
db_delete('migrate_field_mapping')
->condition('machine_name', $machine_name)
->execute();
// Note that not all field mappings in the database came from the UI - they
// may also have been passed through a hook_migrate_api registration, so
// reregister the migration to restore those mappings.
migrate_static_registration(array(
$machine_name,
));
}