You are here

function backup_migrate_crud_delete_confirm_form_submit in Backup and Migrate 6.2

Same name and namespace in other branches
  1. 8.2 includes/crud.inc \backup_migrate_crud_delete_confirm_form_submit()
  2. 8.3 includes/crud.inc \backup_migrate_crud_delete_confirm_form_submit()
  3. 6.3 includes/crud.inc \backup_migrate_crud_delete_confirm_form_submit()
  4. 7.3 includes/crud.inc \backup_migrate_crud_delete_confirm_form_submit()
  5. 7.2 includes/crud.inc \backup_migrate_crud_delete_confirm_form_submit()

Delete a item after confirmation.

File

includes/crud.inc, line 159
CRUD functions for backup and migrate types (schedules, profiles etc.).

Code

function backup_migrate_crud_delete_confirm_form_submit($form, &$form_state) {
  if ($form_state['values']['confirm']) {
    $item = $form_state['values']['item'];
    $item
      ->delete();
  }
  $form_state['redirect'] = BACKUP_MIGRATE_MENU_PATH . "/" . $item->type_name;
}