You are here

function domain_delete_form in Domain Access 5

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

FormsAPI

Parameters

$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_delete in ./domain_admin.inc
Delete a domain record.

File

./domain_admin.inc, line 635
Administration functions for the domain module.

Code

function domain_delete_form($domain, $argumants = array()) {
  $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'],
  );
  $form['domain'] = array(
    '#value' => t('<p>Are you sure you wish to delete the domain record for <b>%domain</b>?</p>', array(
      '%domain' => $domain['subdomain'],
    )),
  );
  $form['cancel'] = array(
    '#value' => '<p>' . l(t('Cancel action'), 'admin/build/domain') . '<br />',
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Delete domain record'),
    '#suffix' => '<p>',
  );
  return $form;
}