function user_permission_features_export in Features 7
Same name and namespace in other branches
- 6 includes/features.user.inc \user_permission_features_export()
- 7.2 includes/features.user.inc \user_permission_features_export()
Implements hook_features_export().
File
- includes/
features.user.inc, line 26
Code
function user_permission_features_export($data, &$export, $module_name = '') {
$export['dependencies']['features'] = 'features';
// Ensure the modules that provide the given permissions are included as dependencies.
$map = user_permission_get_modules();
foreach ($data as $perm) {
if (isset($map[$perm])) {
$perm_module = $map[$perm];
$export['dependencies'][$perm_module] = $perm_module;
$export['features']['user_permission'][$perm] = $perm;
}
}
return array();
}