You are here

function variable_realm_features_export in Variable 7.2

Same name and namespace in other branches
  1. 7 variable_realm/variable_realm.features.inc \variable_realm_features_export()

Implements hook_features_export().

File

variable_realm/variable_realm.features.inc, line 28
Features support for Variable store.

Code

function variable_realm_features_export($data, &$export, $module_name) {
  $export['dependencies']['variable_realm'] = 'variable_realm';
  $list = variable_realm_features_selection($data);
  foreach ($list as $machine_name) {

    // Add module that provides the exported realm
    list($realm, $key) = explode(':', $machine_name, 2);

    // limit 2 because keys can contain colons
    if ($realm_info = variable_realm_info($realm)) {
      $export['dependencies'][$realm_info['module']] = $realm_info['module'];
    }
    $export['features']['variable_realm'][$machine_name] = $machine_name;
  }
  return array();
}