You are here

function migrate_ui_configure_submit in Migrate 7.2

Submit callback for the handler configuration form handler fieldset.

1 string reference to 'migrate_ui_configure_submit'
migrate_ui_configure_form in migrate_ui/migrate_ui.pages.inc
Form for reviewing migrations.

File

migrate_ui/migrate_ui.pages.inc, line 2058
Pages for managing migration processes.

Code

function migrate_ui_configure_submit($form, &$form_state) {
  $disabled = array();
  foreach ($form_state['values']['destination_handlers'] as $class => $value) {
    if (!$value) {
      $disabled[] = $class;
    }
  }
  foreach ($form_state['values']['field_handlers'] as $class => $value) {
    if (!$value) {
      $disabled[] = $class;
    }
  }
  variable_set('migrate_disabled_handlers', serialize($disabled));
  if (!empty($disabled)) {
    drupal_set_message(t('The following handler classes are disabled: @classes', array(
      '@classes' => implode(', ', $disabled),
    )));
  }
  else {
    drupal_set_message(t('No handler classes are currently disabled.'));
  }
}