function _backup_migrate_destination_get_links in Backup and Migrate 5.2
Get the action links for a destination.
1 call to _backup_migrate_destination_get_links()
- backup_migrate_ui_destination_display_destinations in includes/
destinations.inc - List the available backup destinations destination in the UI.
File
- includes/
destinations.inc, line 603 - All of the destination handling code needed for Backup and Migrate.
Code
function _backup_migrate_destination_get_links($destination_id) {
$out = array();
if ($destination = backup_migrate_get_destination($destination_id)) {
// Don't display the download/delete/restore ops if they are not available for this destination.
$can_list = !empty($destination['list_callback']);
$can_conf = !empty($destination['conf_callback']);
if ($can_list && user_access("access backup files")) {
$out[] = l(t("List files"), "admin/content/backup_migrate/destination/files/" . $destination['destination_id']);
}
if ($can_conf) {
$out[] = l(t("Configure..."), "admin/content/backup_migrate/destination/configure/" . $destination['destination_id']);
}
if ($can_conf) {
$out[] = l(t("Delete..."), "admin/content/backup_migrate/destination/delete/" . $destination['destination_id']);
}
}
return $out;
}