function backup_migrate_get_destinations in Backup and Migrate 6.2
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()
- 7.3 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
5 calls to backup_migrate_get_destinations()
- backup_migrate_filter_backup_restore::backup_settings_default in includes/
filters.backup_restore.inc - Get the default backup settings for this filter.
- backup_migrate_filter_backup_restore::backup_settings_form in includes/
filters.backup_restore.inc - Get the form for the backup settings for this filter.
- backup_migrate_get_destination in includes/
destinations.inc - Get the destination of the given id.
- _backup_migrate_drush_destinations in includes/
backup_migrate.drush.inc - Get a list of available destinations with the given op.
- _backup_migrate_get_destination_form_item_options in includes/
destinations.inc - Get the destination options as an options array for a form item.
File
- includes/
destinations.inc, line 178
Code
function backup_migrate_get_destinations($op = 'all') {
static $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;
}