function ctools_term_has_parent_ctools_access_summary

Provide a summary description based upon the checked terms.

1 string reference to 'ctools_term_has_parent_ctools_access_summary'
term_has_parent.inc in plugins/access/term_has_parent.inc
Plugin to provide access control based upon a parent term.

File

plugins/access/term_has_parent.inc, line 157

Code

function ctools_term_has_parent_ctools_access_summary($conf, $context) {
  $vid = (int) $conf['vid'];
  $terms = array();
  foreach ($conf['vid_' . $vid] as $tid) {
    $term = taxonomy_term_load($tid);
    $terms[] = $term->name;
  }
  return format_plural(count($terms), '@term can have the parent "@terms"', '@term can have one of these parents: @terms', array(
    '@terms' => implode(', ', $terms),
    '@term' => $context->identifier,
  ));
}