domain_conf_api

Versions
domain
domain_conf_api($all = FALSE, $settings = array())

Retrieves elements from hook_domainconf() and formats them as needed.

Parameters

$all Should the function return all hook implementations or just those marked with the domain_settings flag. Defaults to FALSE. Used to determine if we are loading configuration options specific to the Domain Access module.

Return value

An array of form elements according to the FormsAPI or an empty array.

▾ 4 functions call domain_conf_api()

domain_conf_default in domain_conf/domain_conf.admin.inc
domain_conf_domainlinks in domain_conf/domain_conf.module
Implement hook_domainlinks()
domain_conf_form in domain_conf/domain_conf.admin.inc
Custom form to generate domain-specific site settings.
domain_view in ./domain.admin.inc
The main administration page, a list of active domains.

Code

domain_conf/domain_conf.module, line 531

<?php
function domain_conf_api($all = FALSE, $settings = array()) {
  global $_domain;
  $options = array();
  $extra = module_invoke_all('domainconf', $_domain);
  if (!empty($extra)) {
    foreach ($extra as $key => $value) {
      foreach (element_children($value) as $element) {
        if (isset($value[$element]['#default_value']) && isset($settings[$element])) {
          $value[$element]['#default_value'] = $settings[$element];
        }
      }
      if ($value['#domain_setting'] == TRUE || $all == TRUE) {
        // Discard the #domain_setting flag; it is not needed.
        unset($value['#domain_setting']);
        // Set the $options array.
        $options[$key] = $value;
      }
    }
  }
  return $options;
}
?>

Contact

  • agentrickard [at] gmail [dot] com

Donations

My Amazon.com Wish List