You are here

function og_get_all_group_entity in Organic groups 7.2

Same name and namespace in other branches
  1. 7 og.module \og_get_all_group_entity()

Return all entity types that have bundles that are a group type.

Return value

Array keyed with the entity type machine name and the entity human readable name as the value, or an empty array if no entities are defined as group.

12 calls to og_get_all_group_entity()
og_context_entity_property_info in og_context/og_context.module
Implements hook_entity_property_info().
og_context_plugin_access_og_perm::options_form in og_context/includes/views/handlers/og_context_plugin_access_og_perm.inc
Provide the default form for setting options.
og_context_plugin_argument_default_group_context::options_form in og_context/includes/views/handlers/og_context_plugin_argument_default_group_context.inc
Provide the default form for setting options.
og_plugin_argument_default_user_groups::options_form in includes/views/handlers/og_plugin_argument_default_user_groups.inc
Provide the default form for setting options.
og_plugin_argument_default_user_groups::option_definition in includes/views/handlers/og_plugin_argument_default_user_groups.inc
List the options relevant for this plugin.

... See full list

1 string reference to 'og_get_all_group_entity'
OgMembershipMetadataController::entityPropertyInfo in ./og.info.inc

File

./og.module, line 2494
Enable users to create and manage groups with roles and permissions.

Code

function og_get_all_group_entity() {
  $return = array();
  $field = field_info_field(OG_GROUP_FIELD);
  if (empty($field['bundles'])) {
    return $return;
  }
  $entity_types = array_keys($field['bundles']);
  foreach ($entity_types as $entity_type) {
    $entity_info = entity_get_info($entity_type);
    $return[$entity_type] = check_plain($entity_info['label']);
  }
  return $return;
}