You are here

function backup_migrate_prune_prune_form in Backup and migrate prune 7

Same name and namespace in other branches
  1. 7.2 backup_migrate_prune.module \backup_migrate_prune_prune_form()

Form for Form API

1 string reference to 'backup_migrate_prune_prune_form'
backup_migrate_prune_menu in ./backup_migrate_prune.module
Implementation of hook_menu().

File

./backup_migrate_prune.module, line 345
Create (manually or scheduled) and restore backups of your Drupal MySQL database with an option to exclude table data (e.g. cache_*)

Code

function backup_migrate_prune_prune_form($form, &$form_state, $gardener_id) {
  try {
    $gardener = new Gardener($gardener_id);
  } catch (ErrorException $e) {
    drupal_set_message($e
      ->getMessage(), 'error');
  }
  $question = t('Are you sure you want to prune the destination with the rules provided by gardener %gardener?', array(
    '%gardener' => $gardener
      ->getName(),
  ));
  $path = BACKUP_MIGRATE_MENU_PATH . '/prune';
  $description = t('If you continue several backup files may be deleted. Proceed only if you are sure you want to delete old backups.');
  $yes = t('Delete old backups');
  $form = array(
    'gardener_id' => array(
      '#type' => 'hidden',
      '#value' => $gardener_id,
    ),
  );
  return confirm_form($form, $question, $path, $description, $yes);
}