You are here

function backup_migrate_filter_backup_restore::backup_settings_form in Backup and Migrate 8.2

Same name and namespace in other branches
  1. 8.3 includes/filters.backup_restore.inc \backup_migrate_filter_backup_restore::backup_settings_form()
  2. 6.3 includes/filters.backup_restore.inc \backup_migrate_filter_backup_restore::backup_settings_form()
  3. 6.2 includes/filters.backup_restore.inc \backup_migrate_filter_backup_restore::backup_settings_form()
  4. 7.3 includes/filters.backup_restore.inc \backup_migrate_filter_backup_restore::backup_settings_form()
  5. 7.2 includes/filters.backup_restore.inc \backup_migrate_filter_backup_restore::backup_settings_form()

Get the form for the backup settings for this filter.

Overrides backup_migrate_filter::backup_settings_form

File

includes/filters.backup_restore.inc, line 75
This filter performs tha actual backup or restore operation. Not technically a filter per-se, but it does need to fit in the call chain.

Class

backup_migrate_filter_backup_restore
A filter backup or migrate the specified source.

Code

function backup_settings_form($settings) {
  backup_migrate_include('destinations');
  $out = array(
    'destinations' => array(
      '#tree' => TRUE,
    ),
  );
  foreach (backup_migrate_get_destinations('source') as $destination) {
    $destination_settings = (array) @$settings['destinations'][$destination
      ->get_id()] + $settings;
    if ($form = $destination
      ->backup_settings_form($destination_settings)) {
      $out['destinations'][$destination
        ->get_id()] = array(
        '#type' => 'details',
        '#title' => t('!name Backup Options', array(
          '!name' => $destination
            ->get('name'),
        )),
        "#collapsed" => TRUE,
        '#tree' => TRUE,
        '#parents' => array(
          'filters',
          'destinations',
          $destination
            ->get_id(),
        ),
      ) + $form;
    }
  }
  return $out;
}