foreach ($tokenForms as $tokenName => $afform) {
$e->tokens['afform']["afform.{$tokenName}Url"] = E::ts('%1 (URL)', [1 => $afform['title'] ?? $afform['name']]);
$e->tokens['afform']["afform.{$tokenName}Link"] = E::ts('%1 (Full Hyperlink)', [1 => $afform['title'] ?? $afform['name']]);
- $e->tokens['afform']["afform.{$tokenName}ValidateSubmissionUrl"] = E::ts('%1 Validate Submission URL)', [1 => $afform['title'] ?? $afform['name']]);
- $e->tokens['afform']["afform.{$tokenName}ValidateSubmissionLink"] = E::ts('%1 Validate Submission (Full Hyperlink)', [1 => $afform['title'] ?? $afform['name']]);
}
+
+ $e->tokens['afform']["afform.validateSubmissionUrl"] = E::ts('Validate Submission URL)');
+ $e->tokens['afform']["afform.validateSubmissionLink"] = E::ts('Validate Submission (Full Hyperlink)');
}
/**
// send email
$emailParams = [
- 'id' => $this->_afform['email_confirmation_template_id'],
+ 'messageTemplateID' => $this->_afform['email_confirmation_template_id'],
'from' => "$domainEmailName <" . $domainEmailAddress . ">",
'toEmail' => $emailAddress,
'tokenContext' => $tokenContext,
];
- civicrm_api3('MessageTemplate', 'send', $emailParams);
+ \CRM_Core_BAO_MessageTemplate::sendTemplate($emailParams);
}
}