You are here

function sweaver_object_delete in Sweaver 6

Same name and namespace in other branches
  1. 7 plugins/sweaver_plugin_editor/sweaver_plugin_editor.admin.inc \sweaver_object_delete()

Delete object form.

1 string reference to 'sweaver_object_delete'
sweaver_plugin_editor::sweaver_menu in plugins/sweaver_plugin_editor/sweaver_plugin_editor.inc
Menu registry.

File

plugins/sweaver_plugin_editor/sweaver_plugin_editor.admin.inc, line 748
Administrative functions for Sweaver.

Code

function sweaver_object_delete(&$form_state, $redirect, $object_type, $object, $action, $action_message) {
  if ($object->export_type != 2) {
    $form['#object'] = $object;
    $form['#object_type'] = $object_type;
    $form['#object_redirect'] = $redirect;
    $form['#action_message'] = $action_message;
    return confirm_form($form, t('Are you sure you want to @action @type %object?', array(
      '@action' => $action,
      '@type' => $object_type,
      '%object' => $object->name,
    )), 'admin/settings/sweaver/editor/' . $redirect);
  }
  else {
    drupal_goto('admin/settings/sweaver/editor/' . $redirect);
  }
}