function hook_group_membership_status_info in Group 7
Provide information about group membership statuses exposed by your module.
Membership statuses are usually simple strings such as Active or Blocked. Modules may add their own membership statuses and handle group memberships differently depending on their status. An example can be found in the Group Invite (ginvite) submodule included in Group.
Return value
array An array whose keys are membership status machine names and whose corresponding values are arrays containing the following key-value pairs:
- title: The human readable title for the membership status.
- active: (boolean) Whether this status should be considered as active, meaning the membership will actually grant permissions to the member. Set to FALSE for suspending statuses such as 'Blocked', 'Banned', etc.
3 functions implement hook_group_membership_status_info()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- ggroup_group_membership_status_info in modules/
ggroup/ ggroup.group.inc - Implements hook_group_membership_status_info().
- ginvite_group_membership_status_info in modules/
ginvite/ ginvite.group.inc - Implements hook_group_membership_status_info().
- group_group_membership_status_info in ./
group.group.inc - Implements hook_group_membership_status_info().
1 invocation of hook_group_membership_status_info()
- group_membership_status_info in helpers/
group.inc - Get the group membership status information.
File
- ./
group.api.php, line 393 - Hooks provided by the Group module.
Code
function hook_group_membership_status_info() {
$info['banned-24'] = array(
'title' => t('Banned (24 hours)'),
'active' => FALSE,
);
$info['banned-48'] = array(
'title' => t('Banned (48 hours)'),
'active' => FALSE,
);
return $info;
}