function backup_migrate_get_destinations in Backup and Migrate 7.3
Same name and namespace in other branches
- 8.2 includes/destinations.inc \backup_migrate_get_destinations()
- 8.3 includes/destinations.inc \backup_migrate_get_destinations()
- 5.2 includes/destinations.inc \backup_migrate_get_destinations()
- 6.3 includes/destinations.inc \backup_migrate_get_destinations()
- 6.2 includes/destinations.inc \backup_migrate_get_destinations()
- 7.2 includes/destinations.inc \backup_migrate_get_destinations()
Get all the available backup destination.
Parameters
$op: The operation which will be performed on the destination. Hooks can use this to return only those destinations appropriate for the given op. Options include: 'manual backup' - destinations available for manual backup 'scheduled backup' - destinations available for schedules backup 'list files' - destinations whose backup files can be listed 'restore' - destinations whose files can be restored from 'all' - all available destinations should be returned
6 calls to backup_migrate_get_destinations()
- backup_migrate_drush_destination_files in includes/
backup_migrate.drush.inc - Get a list of files in a given destination.
- backup_migrate_get_destination in includes/
destinations.inc - Get the destination of the given id.
- backup_migrate_get_saved_backups in ./
backup_migrate.module - List the previously created backups from across multiple destinations.
- backup_migrate_requirements in ./
backup_migrate.install - Implements hook_requirements().
- _backup_migrate_drush_destinations in includes/
backup_migrate.drush.inc - Get a list of available destinations with the given op.
File
- includes/
destinations.inc, line 128
Code
function backup_migrate_get_destinations($op = 'all') {
$destinations =& drupal_static('backup_migrate_get_destinations', NULL);
// Get the list of destinations and cache them locally.
if ($destinations === NULL) {
$destinations = backup_migrate_crud_get_items('destination');
}
// Return all if that's what was asked for.
if ($op == 'all') {
return $destinations;
}
// Return only those destinations which support the given op.
$out = array();
foreach ($destinations as $key => $destination) {
if ($destination
->op($op)) {
$out[$key] = $destination;
}
}
return $out;
}