You are here

function domain_features_selection in Domain Access 7.3

Processes export data selections consistently.

Parameters

$data: Array of selections from the features component form.

Return value

An array of domains, keyed by machine_name.

4 calls to domain_features_selection()
domain_alias_features_export in domain_alias/domain_alias.features.inc
Implements hook_features_export().
domain_conf_features_export in domain_conf/domain_conf.features.inc
Implements hook_features_export().
domain_features_export in ./domain.features.inc
Implements hook_features_export().
domain_theme_features_export in domain_theme/domain_theme.features.inc
Implements hook_features_export().

File

./domain.module, line 3904
Core module functions for the Domain Access suite.

Code

function domain_features_selection($data) {
  $list = array();
  if (!empty($data['all-domains'])) {
    $data = array();
    $domains = domain_domains(TRUE);
    foreach ($domains as $domain) {
      $data[] = $domain['machine_name'];
    }
  }
  foreach ($data as $machine_name) {
    $record = domain_machine_name_load($machine_name);
    if (!empty($record)) {
      $list[$record['machine_name']] = $record['machine_name'];
    }
  }
  return $list;
}