You are here

function og_load_entity_from_group in Organic groups 7

Return a loaded entity from group.

If you already have the group object you can use $group->getEntity() instead.

Parameters

$gid: The group ID.

File

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

Code

function og_load_entity_from_group($gid) {
  if ($group = og_load($gid)) {
    return $group
      ->getEntity();
  }
  return FALSE;
}