You are here

function og_member_ctools_access_summary in Organic groups 7

Same name and namespace in other branches
  1. 7.2 plugins/access/og_member.inc \og_member_ctools_access_summary()

Provide a summary description based upon the checked roles.

1 string reference to 'og_member_ctools_access_summary'
og_member.inc in plugins/access/og_member.inc
Plugin to provide access control based on user group membership.

File

plugins/access/og_member.inc, line 62
Plugin to provide access control based on user group membership.

Code

function og_member_ctools_access_summary($conf, $context) {
  list($user_context, $og_group_context) = $context;
  if (!isset($conf['state'])) {
    return t('Error, unset state');
  }
  $states = og_group_content_states();
  $state = array();
  foreach ($conf['state'] as $value) {
    $state[] = $states[$value];
  }
  return t('@identifier has "@state in @group group"', array(
    '@identifier' => $user_context->identifier,
    '@state' => implode(',', $state),
    '@group' => $og_group_context->identifier,
  ));
}