function user_permission_features_export_options in Features 7
Same name and namespace in other branches
- 6 includes/features.user.inc \user_permission_features_export_options()
- 7.2 includes/features.user.inc \user_permission_features_export_options()
Implements hook_features_export_options().
File
- includes/
features.user.inc, line 45
Code
function user_permission_features_export_options() {
$modules = array();
$module_info = system_get_info('module');
foreach (module_implements('permission') as $module) {
$modules[$module_info[$module]['name']] = $module;
}
ksort($modules);
$options = array();
foreach ($modules as $display_name => $module) {
if ($permissions = module_invoke($module, 'permission')) {
foreach ($permissions as $perm => $perm_item) {
$options[$perm] = strip_tags("{$display_name}: {$perm_item['title']}");
}
}
}
return $options;
}