function user_role_features_export in Features 6
Same name and namespace in other branches
- 7.2 includes/features.user.inc \user_role_features_export()
- 7 includes/features.user.inc \user_role_features_export()
Implementation of hook_features_export().
File
- includes/
features.user.inc, line 152
Code
function user_role_features_export($data, &$export, $module_name = '') {
$export['dependencies']['features'] = 'features';
$map = features_get_default_map('user_role', 'name');
foreach ($data as $role) {
// Role is provided by another module. Add dependency.
if (isset($map[$role]) && $map[$role] != $module_name) {
$export['dependencies'][$map[$role]] = $map[$role];
}
else {
$export['features']['user_role'][$role] = $role;
}
}
return array();
}