function _authorize_filetransfer_connection_settings

Generates the Form API array for a given connection backend's settings.

Parameters

$backend: The name of the backend (e.g. 'ftp', 'ssh', etc).

Return value

Form API array of connection settings for the given backend.

See also

hook_filetransfer_backends()

1 call to _authorize_filetransfer_connection_settings()
authorize_filetransfer_form in drupal/includes/authorize.inc
Form constructor for the file transfer authorization form.

File

drupal/includes/authorize.inc, line 146
Helper functions and form handlers used for the authorize.php script.

Code

function _authorize_filetransfer_connection_settings($backend) {
  $defaults = variable_get('authorize_filetransfer_connection_settings_' . $backend, array());
  $form = array();

  // Create an instance of the file transfer class to get its settings form.
  $filetransfer = authorize_get_filetransfer($backend);
  if ($filetransfer) {
    $form = $filetransfer
      ->getSettingsForm();
  }

  // Fill in the defaults based on the saved settings, if any.
  _authorize_filetransfer_connection_settings_set_defaults($form, NULL, $defaults);
  return $form;
}