function party_hat_party_hat_ctools_access_summary in Party 8.2
Same name and namespace in other branches
- 7 modules/party_hat/plugins/access/party_hat.inc \party_hat_party_hat_ctools_access_summary()
Provide a summary description based upon the checked hats.
1 string reference to 'party_hat_party_hat_ctools_access_summary'
- party_hat.inc in modules/
party_hat/ plugins/ access/ party_hat.inc - Plugin to provide access control based upon hat context.
File
- modules/
party_hat/ plugins/ access/ party_hat.inc, line 80 - Plugin to provide access control based upon hat context.
Code
function party_hat_party_hat_ctools_access_summary($conf, $context) {
$hats = array();
foreach (array_filter($conf['hat_name']) as $hat_name) {
$hat = party_hat_load($hat_name);
$hats[$hat->name] = $hat->label;
}
return format_plural(count($hats), '@hat can be the hat "@hats"', '@hat can be one of these hats: @hats', array(
'@hats' => implode(', ', $hats),
'@hat' => $context->identifier,
));
}