You are here

function hook_domainwarnings in Domain Access 7.2

Same name and namespace in other branches
  1. 5 API.php \hook_domainwarnings()
  2. 6.2 API.php \hook_domainwarnings()

Allows a warning message to be printed when entering specific forms that may have values that vary on each domain.

Return value

An associative array where the keys form_id values representing forms that require warnings. The value should return a link for where the form may be set for the current domain. If no link exists, you should pass NULL as the value.

These values are subject to token replacement, using the syntax %value, where %NAME may be any element of the $_domain array.

Related topics

2 functions implement hook_domainwarnings()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

domain_conf_domainwarnings in domain_conf/domain_conf.module
Implements hook_domainwarnings()
domain_theme_domainwarnings in domain_theme/domain_theme.module
Implements hook_domainwarnings()
1 invocation of hook_domainwarnings()
domain_warning_check in ./domain.module
Sets a message to the site admin.

File

./domain.api.php, line 286
API documentation file.

Code

function hook_domainwarnings() {

  // These are the forms for variables set by Domain Conf.
  $forms = array(
    'system_admin_theme_settings',
    'system_date_time_settings',
    'system_site_information_settings',
    'system_site_maintenance_settings',
  );
  $return = array();
  foreach ($forms as $key) {
    $return[$key] = 'admin/build/domain/path/%domain_id';
  }
  return $return;
}