/**
* Based on input, create participant row for transferee and send email
*
- * @param $participant
+ * @param CRM_Event_BAO_Participant $participant
*
* @throws \API_Exception
* @throws \CRM_Core_Exception
$eventDetails = [];
$eventParams = ['id' => $participant->event_id];
CRM_Event_BAO_Event::retrieve($eventParams, $eventDetails);
+
//get default participant role.
$eventDetails['participant_role'] = $participantRoles[$eventDetails['default_role_id']] ?? NULL;
//get the location info
* return @ void
*/
public function sendCancellation() {
- $domainValues = [];
- $domain = CRM_Core_BAO_Domain::getDomain();
- $tokens = [
- 'domain' =>
- [
- 'name',
- 'phone',
- 'address',
- 'email',
- ],
- 'contact' => CRM_Core_SelectValues::contactTokens(),
- ];
- foreach ($tokens['domain'] as $token) {
- $domainValues[$token] = CRM_Utils_Token::getDomainTokenReplacement($token, $domain);
- }
-
$participantRoles = CRM_Event_PseudoConstant::participantRole();
$participantDetails = [];
$query = "SELECT * FROM civicrm_participant WHERE id = {$this->_from_participant_id}";
$participantDetails[$this->_from_participant_id],
$eventDetails[$this->_event_id],
NULL,
- $domainValues,
'Transferred'
);
$statusMsg = ts('Event registration information for %1 has been updated.', [1 => $this->_contact_name]);