function features_get_storage in Features 6
Same name and namespace in other branches
- 7.2 features.export.inc \features_get_storage()
- 7 features.export.inc \features_get_storage()
Get a summary storage state for a feature.
4 calls to features_get_storage()
- drush_features_list in ./
features.drush.inc - Get a list of all feature modules.
- drush_features_revert_all in ./
features.drush.inc - Revert all enabled features to their definitions in code.
- features_access_override_actions in ./
features.module - Menu access callback for whether a user should be able to access override actions for a given feature.
- features_feature_status in ./
features.admin.inc - Javascript call back that returns the status of a feature.
File
- ./
features.export.inc, line 509
Code
function features_get_storage($module_name) {
// Get component states, and array_diff against array(FEATURES_DEFAULT).
// If the returned array has any states that don't match FEATURES_DEFAULT,
// return the highest state.
$states = features_get_component_states(array(
$module_name,
), FALSE);
$states = array_diff($states[$module_name], array(
FEATURES_DEFAULT,
));
$storage = !empty($states) ? max($states) : FEATURES_DEFAULT;
return $storage;
}