function commons_groups_get_group_content_entity_types in Drupal Commons 7.3
Returns an array of entity types that are enabled via Commons Groups.
11 calls to commons_groups_get_group_content_entity_types()
- commons_bw_node_auto_title_instance in modules/
commons/ commons_bw/ commons_bw.module - Helper function to determine whether Commons_BW should define a title field instance on behalf of a content type.
- commons_groups_field_default_field_instances in modules/
commons/ commons_groups/ commons_groups.features.field_instance.inc - Implements hook_field_default_field_instances().
- commons_groups_form_alter in modules/
commons/ commons_groups/ commons_groups.module - Implements hook_form_alter().
- commons_groups_form_node_form_alter in modules/
commons/ commons_groups/ commons_groups.module - Implements hook_form_BASE_FORM_ID_alter().
- commons_groups_is_group_content in modules/
commons/ commons_groups/ commons_groups.module - Helper function to determine whether an entity bundle is considered group content.
File
- modules/
commons/ commons_groups/ commons_groups.module, line 878
Code
function commons_groups_get_group_content_entity_types($cache = TRUE) {
// Find all Commons Entity integrations.
$commons_entity_integrations = commons_entity_integration_info(NULL, $cache);
if (empty($commons_entity_integrations)) {
return array();
}
foreach ($commons_entity_integrations as $entity_type => $integration) {
foreach ($integration as $bundle => $options) {
if (isset($options['is_group_content']) && $options['is_group_content'] == FALSE) {
unset($commons_entity_integrations[$entity_type][$bundle]);
}
}
// If an entity type has no integrations, don't return it.
if (empty($commons_entity_integrations[$entity_type])) {
unset($commons_entity_integrations[$entity_type]);
}
}
return $commons_entity_integrations;
}