function command_buttons_entity_delete_form_submit in Command Buttons 7
Execute node deletion
File
- ./
command_buttons.admin.inc, line 103
Code
function command_buttons_entity_delete_form_submit($form, &$form_state) {
if ($form_state['values']['confirm']) {
$entity = $form_state['entity'];
command_buttons_delete($entity->bid);
watchdog('command_buttons', '@type: deleted %title.', array(
'@type' => $entity->bundle,
'%title' => $entity->title,
));
drupal_set_message(t('@type %title has been deleted.', array(
'@type' => command_buttons_entities_title($entity->bundle),
'%title' => $entity->title,
)));
}
$form_state['redirect'] = 'admin/structure/command-buttons';
}