You are here

function group_group_permission_access_summary in Group 7

Provide a summary description based upon the checked roles.

1 string reference to 'group_group_permission_access_summary'
group_permission.inc in plugins/ctools/access/group_permission.inc
Plugin to provide access control based upon group permissions.

File

plugins/ctools/access/group_permission.inc, line 74
Plugin to provide access control based upon group permissions.

Code

function group_group_permission_access_summary($conf, $context) {
  $names = array();
  $group_permissions = module_invoke_all('group_permission');
  foreach (array_filter($conf['permissions']) as $permission) {
    $names[] = $group_permissions[$permission]['title'];
  }
  $message_single = '@identifier has group permission "@permissions"';
  $message_plural = '@identifier has one of "@permissions"';
  $replace = array(
    '@permissions' => implode(', ', $names),
    '@identifier' => $context[1]->identifier,
  );
  return format_plural(count($names), $message_single, $message_plural, $replace);
}