function og_get_all_group_bundle in Organic groups 7.2
Return all bundles that are a group type.
Return value
An associative array whose keys are entity types, and whose values are arrays of bundles for that entity type. The array of bundles is keyed by bundle machine name, and the values are bundle labels.
10 calls to og_get_all_group_bundle()
- OgMigrateOgurRoles::import in includes/
migrate/ 7000/ og_ogur_roles.migrate.inc - Create group, group-audience and group description fields.
- OgMigrateRoles::preImport in includes/
migrate/ 7200/ og_roles.migrate.inc - Copy all existing global roles to bundle-specific versions. Although similar processing is available through the og_roles_override() function, special handling is necessary to ensure that custom global roles are copied as well as default global roles.
- OgUiMigrateAddField::import in og_ui/
includes/ migrate/ 7000/ add_field.inc - Add OG_DEFAULT_ACCESS_FIELD to group.
- og_entity_property_info in ./
og.module - Implements hook_entity_property_info().
- og_features_role_features_export_options in includes/
og_features_role.features.inc - Implements hook_features_export_options().
File
- ./
og.module, line 2519 - Enable users to create and manage groups with roles and permissions.
Code
function og_get_all_group_bundle() {
$return = array();
foreach (entity_get_info() as $entity_type => $entity_value) {
foreach ($entity_value['bundles'] as $bundle => $bundle_value) {
if (og_is_group_type($entity_type, $bundle)) {
$return[$entity_type][$bundle] = check_plain($bundle_value['label']);
}
}
}
return $return;
}