domain_conf_api

Definition

domain_conf_api($all = FALSE)
domain_conf/domain_conf.module, line 561

Description

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.

Code

function domain_conf_api($all = FALSE) {
  $options = array();
  $extra = module_invoke_all('domainconf');
  if (!empty($extra)) {
    foreach ($extra as $key => $value) {
      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;
}