You are here

function theme_backup_migrate_file_list in Backup and Migrate 7.3

Same name and namespace in other branches
  1. 8.3 backup_migrate.module \theme_backup_migrate_file_list()

Theme file list form widget.

1 theme call to theme_backup_migrate_file_list()
backup_migrate_element_info in ./backup_migrate.module
Implements hook_element_info().

File

./backup_migrate.module, line 1036
Backup and restore databases for Drupal.

Code

function theme_backup_migrate_file_list($vars) {
  $element = $vars['element'];

  // Render the radios so they can be placed in the file list rendering.
  $vars['element']['#display_options']['form_elements'] = array();
  if (isset($vars['element']['files']) && count($vars['element']['files'])) {
    foreach (element_children($vars['element']['files']) as $id) {
      $vars['element']['files'][$id]['#title'] = '';
      $vars['element']['#display_options']['form_elements'][$id] = render($vars['element']['files'][$id]);
    }
  }
  $out = _backup_migrate_ui_destination_display_file_list($vars['element']['#files'], $vars['element']['#display_options']);
  return $out;
}