You are here

function domain_theme_page in Domain Access 7.3

Same name and namespace in other branches
  1. 5 domain_theme/domain_theme.module \domain_theme_page()
  2. 6.2 domain_theme/domain_theme.admin.inc \domain_theme_page()
  3. 7.2 domain_theme/domain_theme.admin.inc \domain_theme_page()

The domain theme page callback router.

Parameters

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

1 string reference to 'domain_theme_page'
domain_theme_menu in domain_theme/domain_theme.module
Implements hook_menu()

File

domain_theme/domain_theme.admin.inc, line 16
Include file to handle theme configuration screen

Code

function domain_theme_page($domain) {
  if (isset($domain['domain_id'])) {

    // Check the current domain.
    if ($domain['domain_id'] == domain_default_id()) {
      drupal_set_message(t('This is your default domain. Use of this form is discouraged. Set these values through the standard interface.'), 'warning', FALSE);
    }

    // Load the system form file.
    include_once drupal_get_path('module', 'system') . '/system.admin.inc';

    // Set the page title and generate the form.
    drupal_set_title(t('Theme for @site', array(
      '@site' => $domain['subdomain'],
    )));
    return drupal_get_form('domain_theme_form', $domain);
  }
  else {
    $build['content'] = array(
      '#markup' => t('Invalid domain request.'),
    );
    return $build;
  }
}