You are here

function og_features_permission_features_export_options in Organic groups 7.2

Implements hook_features_export_options().

File

includes/og_features_permission.features.inc, line 51
Integration with features for og permissions.

Code

function og_features_permission_features_export_options() {
  $options = array();
  $modules = array();
  $module_info = system_get_info('module');
  $permissions = _og_features_get_permissions();
  foreach ($permissions as $group_type => $bundles) {
    foreach ($bundles as $bundle => $permissions) {
      foreach ($permissions as $permission => $info) {
        $key = $group_type . ':' . $bundle . ':' . $permission;
        $name = '(' . $group_type . ':' . $bundle . ') ' . $permission;
        $options[$key] = strip_tags($module_info[$info['module']]['name'] . ': ' . $name);
      }
    }
  }
  return $options;
}