function pet_recipients_formatted in Previewable email templates 8
Same name and namespace in other branches
- 8.4 pet.module \pet_recipients_formatted()
- 6 pet.admin.inc \pet_recipients_formatted()
- 7 includes/pet.admin.inc \pet_recipients_formatted()
Return formatted list of PET recipients for preview display.
1 call to pet_recipients_formatted()
- PetPreviewForm::buildForm in src/
Form/ PetPreviewForm.php - Form constructor.
File
- ./
pet.module, line 373 - Previewable Email Template module.
Code
function pet_recipients_formatted($recipients) {
$build = [];
if (is_array($recipients)) {
foreach ($recipients as $recipient) {
$output = '';
$output .= $recipient['mail'] . ' ';
$output .= $recipient['uid'] ? t('(user @uid)', [
'@uid' => $recipient['uid'],
]) : t('(no user id)');
$output .= "\n";
$build['#markup'] = $output;
}
return $build;
}
}