function bean_form_delete_submit in Bean (for Drupal 7) 7
Button submit function: handle the 'Delete' button on the bean form.
1 string reference to 'bean_form_delete_submit'
- bean_form in includes/
bean.pages.inc - Bean form
File
- includes/
bean.pages.inc, line 459 - Bean Functions
Code
function bean_form_delete_submit($form, &$form_state) {
$destination = array();
if (isset($_GET['destination'])) {
$destination = drupal_get_destination();
unset($_GET['destination']);
}
$bean = $form_state['values']['bean'];
$form_state['redirect'] = array(
$bean
->deleteURL(),
array(
'query' => $destination,
),
);
}