function entity_example_basic_edit_delete

Form deletion handler.

@todo: 'Are you sure?' message.

Related topics

1 string reference to 'entity_example_basic_edit_delete'
entity_example_basic_form in entity_example/entity_example.module
Form function to create an entity_example_basic entity.

File

entity_example/entity_example.module, line 472

Code

function entity_example_basic_edit_delete($form, &$form_state) {
    $entity = $form_state['values']['basic_entity'];
    entity_example_basic_delete($entity);
    drupal_set_message(t('The entity %item_description (ID %id) has been deleted', array(
        '%item_description' => $entity->item_description,
        '%id' => $entity->basic_id,
    )));
    $form_state['redirect'] = 'examples/entity_example';
}