function privatemsg_groups_privatemsg_recipient_type_info in Privatemsg 7.2
Implements hook_privatemsg_recipient_type_info().
File
- privatemsg_groups/
privatemsg_groups.module, line 56 - Allows to send messages to all members of an organic group
Code
function privatemsg_groups_privatemsg_recipient_type_info() {
$info = array();
foreach (og_get_all_group_bundle() as $entity_type => $bundles) {
$entity_info = entity_get_info($entity_type);
$name = $entity_info['label'];
$info[_privatemsg_groups_get_group_recipient_type($entity_type)] = array(
'name' => t('Organic Group: ') . $entity_info['label'],
'description' => t('Enter the name of an organic group to write a message to all users in that group.'),
'load' => 'privatemsg_groups_load_multiple',
'format' => 'privatemsg_groups_format',
'autocomplete' => 'privatemsg_groups_autocomplete',
'generate recipients' => 'privatemsg_groups_load_recipients',
'count' => 'privatemsg_groups_count_recipients',
'write callback' => 'privatemsg_groups_write_access',
'view access' => 'view organic groups recipients',
);
}
return $info;
}