You are here

function coder_upgrade_conversions_form_defaults in Coder 7

Same name and namespace in other branches
  1. 7.2 coder_upgrade/includes/conversion.inc \coder_upgrade_conversions_form_defaults()

Sets the default values to display on the module conversions form.

Return value

array Arrays of default values.

1 call to coder_upgrade_conversions_form_defaults()
coder_upgrade_conversions_form in coder_upgrade/includes/conversion.inc
Form builder for the module conversion form.

File

coder_upgrade/includes/conversion.inc, line 427

Code

function coder_upgrade_conversions_form_defaults($form_state) {

  // D7: the key is used (and the value is irrelevant); D6: the value.
  $upgrades = array(
    'coder_upgrade' => 1,
  );
  $extensions = array(
    'inc' => TRUE,
    'info' => TRUE,
    'install' => TRUE,
    'module' => TRUE,
  );
  $directories = array();

  // 'samples' => 1;
  $modules = array();
  if (!isset($form_state['values'])) {
    return array(
      $upgrades,
      $extensions,
      $directories,
      $modules,
    );
  }

  // Set defaults from submitted values.
  return coder_upgrade_selections($form_state);
}