You are here

function hook_entity_info in Group 7

Provide entity metadata for the Group module.

This is not a real hook but instead lists extra entity info keys you can use in hook_entity_info().

The following extra keys are available:

  • group entity: Whether this entity can be attached to group entities. Note that group_entity_info_alter() takes care of the node entity. User entities are handled through group memberships. Defaults to FALSE, available options are:

    • FALSE: This entity may not be attached to groups.
    • 'single': This entity may only be attached to one group at any given

    time. The 'group' property of entities of this type will be a single group id (integer value).

    • 'multiple': This entity may be attached to multiple groups at the same

    time. The 'group' property on entities of this type will be an array of group ids.

See also

hook_entity_info()

group_entity_info_alter()

2 functions implement hook_entity_info()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

gprofile_entity_info in modules/gprofile/gprofile.entity.inc
Implements hook_entity_info().
group_entity_info in ./group.entity.inc
Implements hook_entity_info().

File

./group.api.php, line 51
Hooks provided by the Group module.

Code

function hook_entity_info() {
  $info['node'] = array(
    // ...
    'group entity' => 'single',
  );
  return $info;
}