You are here

function configuration_get_storage in Configuration Management 7

Get a summary storage state for a feature.

File

./configuration.export.inc, line 414

Code

function configuration_get_storage($module_name) {

  // Get component states, and array_diff against array(CONFIGURATION_DEFAULT).
  // If the returned array has any states that don't match CONFIGURATION_DEFAULT,
  // return the highest state.
  $states = configuration_get_component_states(array(
    $module_name,
  ), FALSE);
  $states = array_diff($states[$module_name], array(
    CONFIGURATION_DEFAULT,
  ));
  $storage = !empty($states) ? max($states) : CONFIGURATION_DEFAULT;
  return $storage;
}