You are here

function _backup_migrate_get_source_form in Backup and Migrate 7.3

Same name and namespace in other branches
  1. 8.2 includes/destinations.inc \_backup_migrate_get_source_form()
  2. 8.3 includes/sources.inc \_backup_migrate_get_source_form()
  3. 6.3 includes/sources.inc \_backup_migrate_get_source_form()
  4. 6.2 includes/destinations.inc \_backup_migrate_get_source_form()
  5. 7.2 includes/destinations.inc \_backup_migrate_get_source_form()

Get the source options as a form element.

2 calls to _backup_migrate_get_source_form()
backup_migrate_schedule::edit_form in includes/schedules.inc
Get the edit form.
backup_migrate_ui_manual_backup_form in ./backup_migrate.module
The backup/export form.

File

includes/sources.inc, line 100

Code

function _backup_migrate_get_source_form($source_id = 'db') {
  require_once dirname(__FILE__) . '/destinations.inc';
  $form = array();
  $sources = _backup_migrate_get_source_pulldown($source_id);
  if (count($sources['#options']) > 1) {
    $form['source'] = array(
      "#type" => "fieldset",
      "#title" => t("Backup Source"),
      "#collapsible" => TRUE,
      "#collapsed" => FALSE,
      "#tree" => FALSE,
    );
    $sources['#description'] = t("Choose the database to backup. Any database destinations you have created and any databases specified in your settings.php can be backed up.");
    $form['source']['source_id'] = $sources;
  }
  else {
    $form = array();
    $form['source']['source_id'] = array(
      "#type" => "value",
      "#value" => $source_id,
    );
  }
  return $form;
}