You are here

function _backup_migrate_drush_sources in Backup and Migrate 7.3

Same name and namespace in other branches
  1. 8.3 includes/backup_migrate.drush.inc \_backup_migrate_drush_sources()

Get a list of available destinations with the given op.

1 call to _backup_migrate_drush_sources()
backup_migrate_drush_sources in includes/backup_migrate.drush.inc
Get a list of available sources.

File

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

Code

function _backup_migrate_drush_sources($op = NULL) {
  require_once dirname(__FILE__) . '/sources.inc';
  $rows = array(
    array(
      dt('ID'),
      dt('Name'),
      dt('Operations'),
    ),
  );
  foreach (backup_migrate_get_sources($op) as $destination) {
    $rows[] = array(
      $destination
        ->get_id(),
      $destination
        ->get_name(),
      implode(', ', $destination
        ->ops()),
    );
  }
  drush_print_table($rows, TRUE, array(
    32,
    32,
  ));
}