function hook_commons_entity_integration in Drupal Commons 7.3
Define entity integrations.
This hook allows modules to register entity types and/or bundles that they provide for integration with Commons functionality. For example, a webform module could use it to register a form entity type and its "Test", "Survey" and "Suggestion" bundles.
Return value
An associative array of entity integrations whose keys define the entity type for each integration and whose values contain the bundles which have been integrated. Each bundle is itself an associative array, whose keys define the type of integration to enable and whose values contain the status of the integration. TRUE = enabled, FALSE = disabled.
For a detailed usage example, see commons_q_a.module.
See also
hook_commons_entity_integration_alter()
7 functions implement hook_commons_entity_integration()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- commons_documents_commons_entity_integration in modules/
commons/ commons_documents/ commons_documents.commons.inc - Implements hook_commons_entity_integration().
- commons_events_commons_entity_integration in modules/
commons/ commons_events/ commons_events.commons.inc - Implements hook_commons_entity_integration().
- commons_groups_commons_entity_integration in modules/
commons/ commons_groups/ commons_groups.commons.inc - Implements hook_commons_entity_integration().
- commons_polls_commons_entity_integration in modules/
commons/ commons_polls/ commons_polls.commons.inc - Implements hook_commons_entity_integration().
- commons_posts_commons_entity_integration in modules/
commons/ commons_posts/ commons_posts.commons.inc - Implements hook_commons_entity_integration().
3 invocations of hook_commons_entity_integration()
- commons_entity_integration_info in ./
commons.profile - Get Commons entity integration information.
- commons_groups_system_info_alter in modules/
commons/ commons_groups/ commons_groups.module - Implements hook_system_info_alter().
- commons_media_system_info_alter in modules/
commons/ commons_media/ commons_media.module - Implements hook_system_info_alter().
File
- ./
commons.api.php, line 32 - Hooks provided by the Commons module.
Code
function hook_commons_entity_integration() {
// Register three of the webform entity's bundles for various integrations.
return array(
'webform' => array(
'test' => array(
'exclude_rate' => TRUE,
'is_group_content' => FALSE,
),
'survey' => array(
'is_group_content' => TRUE,
'exclude_topics' => TRUE,
),
'suggestion' => array(
'media' => TRUE,
'is_group_content' => TRUE,
'exclude_commons_follow' => TRUE,
),
),
'node' => array(
'group' => array(
'is_group_content' => FALSE,
'is_group' => TRUE,
'exclude_commons_follow' => TRUE,
),
),
);
}