You are here

function domain_conf_default in Domain Access 6.2

Same name and namespace in other branches
  1. 5 domain_conf/domain_conf.module \domain_conf_default()
  2. 7.2 domain_conf/domain_conf.admin.inc \domain_conf_default()

Special configuration options for the main domain.

Parameters

$domain: The $domain object for the default domain.

Return value

A $form array according to the FormsAPI, if unique configuration is possible.

1 string reference to 'domain_conf_default'
domain_conf_page in domain_conf/domain_conf.admin.inc
The domain conf page callback router.

File

domain_conf/domain_conf.admin.inc, line 122
Domain manager configuration options.

Code

function domain_conf_default($form_state, $domain) {
  drupal_set_title(t('@site : Domain site settings', array(
    '@site' => $domain['sitename'],
  )));
  $form = array();

  // Grab any extra elements defined by other modules.
  $extra = domain_conf_api();
  if (!empty($extra)) {

    // Convert the $extra array to the $form array.
    $form = $extra;
    $form['domain_conf_message'] = array(
      '#type' => 'markup',
      '#value' => t('<p>The following custom settings may be applied to the main domain.  These options are specific to the Domain module and do not have standard configuration pages.</p>'),
      '#weight' => -100,
    );

    // Domain information, for saving.
    $form['domain_id'] = array(
      '#type' => 'value',
      '#value' => $domain['domain_id'],
    );

    // Submit functions
    $form['#submit'][] = 'domain_conf_form_submit';
    $form['submit'] = array(
      '#type' => 'submit',
      '#value' => t('Save domain settings'),
      '#weight' => 10,
    );
  }
  else {
    $form['domain_conf_message'] = array(
      '#type' => 'markup',
      '#value' => t('There are no custom domain settings to configure.'),
    );
  }
  return $form;
}