You are here

function _backup_migrate_drush_destinations in Backup and Migrate 6.2

Same name and namespace in other branches
  1. 8.2 includes/backup_migrate.drush.inc \_backup_migrate_drush_destinations()
  2. 8.3 includes/backup_migrate.drush.inc \_backup_migrate_drush_destinations()
  3. 6.3 includes/backup_migrate.drush.inc \_backup_migrate_drush_destinations()
  4. 7.3 includes/backup_migrate.drush.inc \_backup_migrate_drush_destinations()
  5. 7.2 includes/backup_migrate.drush.inc \_backup_migrate_drush_destinations()

Get a list of available destinations with the given op.

2 calls to _backup_migrate_drush_destinations()
backup_migrate_drush_destinations in includes/backup_migrate.drush.inc
Get a list of available destinations.
backup_migrate_drush_sources in includes/backup_migrate.drush.inc
Get a list of available sources.

File

includes/backup_migrate.drush.inc, line 160
Drush commands for backup and migrate.

Code

function _backup_migrate_drush_destinations($op = NULL) {
  backup_migrate_include('destinations');
  $rows = array(
    array(
      dt('ID'),
      dt('Name'),
      dt('Operations'),
    ),
  );
  foreach (backup_migrate_get_destinations($op) as $destination) {
    $rows[] = array(
      $destination
        ->get_id(),
      $destination
        ->get_name(),
      implode(', ', $destination
        ->ops()),
    );
  }
  drush_print_table($rows, TRUE, array(
    32,
    32,
  ));
}