You are here

function user_permission_features_export_options in Features 6

Same name and namespace in other branches
  1. 7.2 includes/features.user.inc \user_permission_features_export_options()
  2. 7 includes/features.user.inc \user_permission_features_export_options()

Implementation of hook_features_export_options().

File

includes/features.user.inc, line 63

Code

function user_permission_features_export_options() {
  $options = array();
  foreach (module_list() as $module) {
    $prefix = check_plain($module) . ': ';
    if ($permissions = module_invoke($module, 'perm')) {
      foreach ($permissions as $permission) {
        $options[$permission] = $prefix . check_plain($permission);
      }
    }
  }
  asort($options);
  return $options;
}