function group_group_role_access_summary in Group 7
Provide a summary description based upon the checked roles.
1 string reference to 'group_group_role_access_summary'
- group_role.inc in plugins/
ctools/ access/ group_role.inc - Plugin to provide access control based upon group role.
File
- plugins/
ctools/ access/ group_role.inc, line 84 - Plugin to provide access control based upon group role.
Code
function group_group_role_access_summary($conf, $context) {
$names = array();
$group_roles = group_role_labels(TRUE);
foreach (array_filter($conf['roles']) as $role) {
$names[] = $group_roles[$role];
}
$message_single = '@identifier has group role "@roles"';
$message_plural = '@identifier has one of "@roles"';
$replace = array(
'@roles' => implode(', ', $names),
'@identifier' => $context[1]->identifier,
);
return format_plural(count($names), $message_single, $message_plural, $replace);
}