function ctools_role_ctools_access_summary

cis7 role.inc ctools_role_ctools_access_summary($conf, $context)
cle7 role.inc ctools_role_ctools_access_summary($conf, $context)
elmsmedia7 role.inc ctools_role_ctools_access_summary($conf, $context)
icor7 role.inc ctools_role_ctools_access_summary($conf, $context)
meedjum_blog7 role.inc ctools_role_ctools_access_summary($conf, $context)
mooc7 role.inc ctools_role_ctools_access_summary($conf, $context)

Provide a summary description based upon the checked roles.

1 string reference to 'ctools_role_ctools_access_summary'
role.inc in sites/all/modules/ulmus/ctools/plugins/access/role.inc
Plugin to provide access control based upon role membership.

File

sites/all/modules/ulmus/ctools/plugins/access/role.inc, line 62
Plugin to provide access control based upon role membership.

Code

function ctools_role_ctools_access_summary($conf, $context) {
  if (!isset($conf['rids'])) {
    $conf['rids'] = array();
  }
  $roles = ctools_get_roles();

  $names = array();
  foreach (array_filter($conf['rids']) as $rid) {
    $names[] = check_plain($roles[$rid]);
  }

  if (empty($names)) {
    return t('@identifier can have any role', array('@identifier' => $context->identifier));
  }

  return format_plural(count($names), '@identifier has role "@roles"', '@identifier has one of "@roles"', array('@roles' => implode(', ', $names), '@identifier' => $context->identifier));
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.