You are here

function theme_privatemsg_groups_format in Privatemsg 7.2

Format a role to be displayed as a recipient.

File

privatemsg_groups/privatemsg_groups.module, line 120
Allows to send messages to all members of an organic group

Code

function theme_privatemsg_groups_format($variables) {
  $recipient = $variables['recipient'];
  $options = $variables['options'];
  $group_type = _privatemsg_groups_get_group_type($recipient->type);
  $gid = $recipient->recipient;
  $group = entity_load_single($group_type, $gid);
  $name = entity_label($group_type, $group);
  if (!empty($options['plain'])) {
    if (!empty($options['unique'])) {
      $name .= ' [group]';
    }
    return $name;
  }
  return t('%group (group)', array(
    '%group' => $name,
  ));
}