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 467
Hook implementations for the Entity Example module.

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';
}