function registration_delete_confirm_submit in Entity Registration 7
Same name and namespace in other branches
- 8.2 includes/registration.forms.inc \registration_delete_confirm_submit()
- 8 includes/registration.forms.inc \registration_delete_confirm_submit()
- 7.2 includes/registration.forms.inc \registration_delete_confirm_submit()
Execute node deletion.
File
- includes/
registration.forms.inc, line 384 - Form definitions and callbacks for Registration.
Code
function registration_delete_confirm_submit($form, &$form_state) {
if ($form_state['values']['confirm']) {
$registration = $form_state['values']['registration'];
registration_delete_multiple(array(
$registration->registration_id,
));
watchdog('registration', 'Registration %id deleted.', array(
'%id' => $registration->registration_id,
));
drupal_set_message(t('Registration %id has been deleted.', array(
'%id' => $registration->registration_id,
)));
$wrapper = entity_metadata_wrapper('registration', $registration);
$host = $wrapper->entity
->value();
$uri = entity_uri($registration->entity_type, $host);
$form_state['redirect'] = $uri['path'];
}
}