You are here

function group_entity_view in Group 7

Implements hook_entity_view().

Add the membership actions form as an extra field display to groups.

File

./group.entity.inc, line 740
Contains all Entity API functions for the Group module.

Code

function group_entity_view($entity, $type, $view_mode, $langcode) {
  global $user;
  if ($type == 'group') {
    module_load_include('inc', 'group', 'forms/group.membership_actions');
    $entity->content['membership_actions'] = drupal_get_form('group_membership_actions_form', $entity, $user);
  }
}