You are here

function coder_upgrade_selections in Coder 7

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

Returns all submitted values.

Parameters

array $values: Array of $form_state['values'].

Return value

array Arrays of submitted values.

2 calls to coder_upgrade_selections()
coder_upgrade_conversions_form_defaults in coder_upgrade/includes/conversion.inc
Sets the default values to display on the module conversions form.
coder_upgrade_conversions_prepare in coder_upgrade/includes/conversion.inc
Returns the parameters to submit for module conversion.

File

coder_upgrade/includes/conversion.inc, line 463

Code

function coder_upgrade_selections($form_state) {

  // Initialize these as not all may be set by some form users.
  $upgrades = $extensions = $directories = $modules = array();

  // Set keys to validate.
  $keys = coder_upgrade_selection_types($form_state);

  // Build arrays of each user selection type.
  $values = $form_state['values'];
  foreach ($keys as $key) {
    if (isset($values[$key])) {
      ${$key} = coder_upgrade_selections_extract($values[$key]['list']);
    }
  }
  return array(
    $upgrades,
    $extensions,
    $directories,
    $modules,
  );
}