You are here

function form_process_backup_migrate_file_list in Backup and Migrate 8.3

Same name and namespace in other branches
  1. 7.3 backup_migrate.module \form_process_backup_migrate_file_list()

Callback function for backup_migrate_file_list '#process' callback.

1 string reference to 'form_process_backup_migrate_file_list'
backup_migrate_element_info in ./backup_migrate.module
Implements hook_element_info().

File

./backup_migrate.module, line 226
Create (manually or scheduled) and restore backups of your Drupal MySQL database with an option to exclude table data (e.g. cache_*)

Code

function form_process_backup_migrate_file_list($element) {
  if (count($element['#files']) > 0) {
    $weight = 0;
    $options = array();
    $max = $count = $element['#display_options']['limit'];
    $files = $element['#files'];
    foreach ($files as $id => $file) {
      $options[$id] = $file
        ->info('filename');
    }
    $element['files'] = array(
      '#type' => 'radios',
      '#options' => $options,
      '#default_value' => $element['#default_value'],
      '#parents' => $element['#parents'],
    );
  }
  return $element;
}