You are here

function backup_migrate_ui_destination_display_destinations in Backup and Migrate 5.2

List the available backup destinations destination in the UI.

1 string reference to 'backup_migrate_ui_destination_display_destinations'
backup_migrate_menu in ./backup_migrate.module
Implementation of hook_menu().

File

includes/destinations.inc, line 327
All of the destination handling code needed for Backup and Migrate.

Code

function backup_migrate_ui_destination_display_destinations() {
  $out = array();
  foreach (backup_migrate_get_destinations('all') as $destination_id => $destination) {
    $links = _backup_migrate_destination_get_links($destination_id);

    // If there's nothing that can be done with this destination, don't show it.
    if ($links) {
      $out[] = array(
        check_plain($destination['name']),
        $destination['type_name'],
        check_plain($destination['location']),
        implode(" | ", $links),
      );
    }
  }
  $headers = array(
    t('Name'),
    t('Type'),
    t('Location'),
    t('Operations'),
  );
  return theme("table", $headers, $out) . l(t("Create new destination..."), 'admin/content/backup_migrate/destination/add');
}