You are here

function boxes_delete_confirm_submit in Boxes 7.2

Execute box deletion

File

includes/boxes.pages.inc, line 376
Box Functions

Code

function boxes_delete_confirm_submit($form, &$form_state) {
  if ($form_state['values']['confirm']) {
    $box = $form['#box'];
    $box
      ->delete();
    watchdog('boxes', '@type: deleted %title.', array(
      '@type' => $box
        ->typeName(),
      '%title' => $box
        ->label(),
    ));
    drupal_set_message(t('@type %title has been deleted.', array(
      '@type' => $box
        ->typeName(),
      '%title' => $box
        ->label(),
    )));
  }
  $form_state['redirect'] = '<front>';
}