function units_unit_form_delete_submit in Units of Measurement 7.2
Same name and namespace in other branches
- 7 units_ui.pages.inc \units_unit_form_delete_submit()
Submit handler for 'units_unit_form'.
Delete an entity of type 'units_unit'.
1 string reference to 'units_unit_form_delete_submit'
- units_unit_form in ./
units_ui.pages.inc - Generate editing form for entity type 'units_unit'.
File
- ./
units_ui.pages.inc, line 192 - Menu page callbacks for Units UI module.
Code
function units_unit_form_delete_submit($form, &$form_state) {
$entity = entity_ui_form_submit_build_entity($form, $form_state);
units_unit_delete($entity);
drupal_set_message(t('Unit %name has been successfully deleted.', array(
'%name' => entity_label('units_unit', $entity),
)));
// Taking user back to the overview page.
$form_state['redirect'] = array(
units_ui_overview_uri($entity),
);
}