You are here

function domain_conf_page in Domain Access 7.2

Same name and namespace in other branches
  1. 5 domain_conf/domain_conf.module \domain_conf_page()
  2. 6.2 domain_conf/domain_conf.admin.inc \domain_conf_page()
  3. 7.3 domain_conf/domain_conf.admin.inc \domain_conf_page()

The domain conf page callback router.

Parameters

$domain: The $domain object created by domain_lookup().

Return value

The appropriate form or an error message.

1 string reference to 'domain_conf_page'
domain_conf_menu in domain_conf/domain_conf.module
Implements hook_menu()

File

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

Code

function domain_conf_page($domain) {
  if ($domain == -1) {
    return t('Invalid page requested.');
  }
  $output = theme('domain_conf_reset', array(
    'domain' => $domain,
  ));
  if ($domain['domain_id'] > 0) {
    drupal_set_title(t('!site : Domain site settings', array(
      '!site' => $domain['sitename'],
    )));
    $form = drupal_get_form('domain_conf_form', $domain);
  }
  elseif ($domain['domain_id'] == 0) {
    $form = drupal_get_form('domain_conf_default', $domain);
  }
  $form['intro'] = array(
    '#weight' => -5,
    '#markup' => $output,
  );
  return $form;
}