function hook_group_membership_metadata in Group 7
Provide human readable metadata for a membership.
Parameters
GroupMembership $group_membership: The membership to format the data for.
Return value
array An array of formatted data. Each entry is an array on its own with two required keys: 'description' and 'value'.
4 functions implement hook_group_membership_metadata()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- gadd_group_membership_metadata in modules/
gadd/ gadd.group.inc - Implements hook_group_membership_metadata().
- ggroup_group_membership_metadata in modules/
ggroup/ ggroup.group.inc - Implements hook_group_membership_metadata().
- ginvite_group_membership_metadata in modules/
ginvite/ ginvite.group.inc - Implements hook_group_membership_metadata().
- group_group_membership_metadata in ./
group.group.inc - Implements hook_group_membership_metadata().
1 invocation of hook_group_membership_metadata()
- group_membership_metadata in pages/
group_membership.inc - Generates a group membership's metadata page.
File
- ./
group.api.php, line 364 - Hooks provided by the Group module.
Code
function hook_group_membership_metadata(GroupMembership $group_membership) {
$metadata = array();
if (!empty($group_membership->joined_on)) {
$metadata[] = array(
'description' => t('Joined on'),
'value' => format_date($group_membership->joined_on),
);
}
return $metadata;
}