1 entity_example.module entity_example_basic_edit_delete($form, &$form_state)

Form deletion handler.

@todo: 'Are you sure?' message.

Related topics

File

modules/examples/entity_example/entity_example.module, line 465
Implements the basic functionality required to create and display an entity.

Code

function entity_example_basic_edit_delete($form, &$form_state) {
  $entity = $form_state['values']['basic_entity'];
  entity_example_basic_delete($entity);
  backdrop_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';
}