You are here

function domain_delete_form in Domain Access 7.2

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

A delete confirmation 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
Implements hook_menu()

File

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

Code

function domain_delete_form($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'] = array(
    '#type' => 'value',
    '#value' => $domain,
  );
  return confirm_form($form, t('Are you sure you wish to delete the domain record for <strong>%domain</strong>?', array(
    '%domain' => $domain['subdomain'],
  )), 'admin/structure/domain/view', NULL, t('Delete domain record'), t('Cancel'));
}