You are here

function domain_delete_form in Domain Access 6.2

Same name and namespace in other branches
  1. 5 domain_admin.inc \domain_delete_form()
  2. 7.3 domain.admin.inc \domain_delete_form()
  3. 7.2 domain.admin.inc \domain_delete_form()

Implement domain_delete_form.

Parameters

$form_state: The current form state, passed by FormsAPI.

$domain: An array containing the record from the {domain} table.

$arguments: An array of additional hidden key/value pairs to pass to the form. Used by child modules to control behaviors. Currently supported arguments are: 'user_submitted' => TRUE Indicates that a form should not process administrative messages and paths upon form submit. Used by the Domain User module.

1 string reference to 'domain_delete_form'
domain_menu in ./domain.module
Implement hook_menu()

File

./domain.admin.inc, line 561
Administration functions for the domain module.

Code

function domain_delete_form($form_state, $domain, $arguments = array()) {

  // This action should be performed from the primary domain.
  domain_check_primary();
  $form = array();

  // The $arguments arrray allows other modules to pass values to change the bahavior
  // of submit and validate functions.
  if (!empty($arguments)) {
    $form['domain_arguments'] = array(
      '#type' => 'value',
      '#value' => $arguments,
    );
  }
  $form['domain_id'] = array(
    '#type' => 'value',
    '#value' => $domain['domain_id'],
  );
  return confirm_form($form, t('Are you sure you wish to delete the domain record for <strong>%domain</strong>?', array(
    '%domain' => $domain['subdomain'],
  )), 'admin/build/domain/view', NULL, t('Delete domain record'), t('Cancel'));
}