function bean_delete_confirm_submit in Bean (for Drupal 7) 7
Execute bean deletion
File
- includes/
bean.pages.inc, line 487 - Bean Functions
Code
function bean_delete_confirm_submit($form, &$form_state) {
if ($form_state['values']['confirm']) {
$bean = $form['#bean'];
$bean
->delete();
watchdog('bean', '@type: deleted %title.', array(
'@type' => $bean
->typeName(),
'%title' => $bean
->label(),
));
drupal_set_message(t('@type %title has been deleted.', array(
'@type' => $bean
->typeName(),
'%title' => $bean
->label(),
)));
}
$form_state['redirect'] = '<front>';
}