$object->label)), "islandora/object/$object->id", t('This action cannot be undone.'), t('Delete'), t('Cancel') ); } /** * Delete's the given object. * * @param array $form * The Drupal form. * @param array $form_state * The Drupal form state. */ function islandora_delete_object_form_submit(array $form, array &$form_state) { module_load_include('inc', 'islandora', 'includes/datastream'); module_load_include('inc', 'islandora', 'includes/utilities'); $object = $form_state['object']; $parents = islandora_get_parents_from_rels_ext($object); $parent = array_pop($parents); $form_state['redirect'] = isset($parent) ? "islandora/object/{$parent->id}" : 'islandora'; islandora_delete_object($object); }