domain_conf_default

Definition

domain_conf_default($domain)
domain_conf/domain_conf.module, line 85

Code

function domain_conf_default($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'] = array();
    $form['#validate']['domain_conf_form_validate'] = array();
    $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;
}