'Pending from approval' => ['Registered', 'Cancelled'],
];
- /**
- */
- public function __construct() {
- parent::__construct();
- }
-
/**
* Takes an associative array and creates a participant object.
*
*
* @param array $defaults
* @param string $property
- * @param string $lookup
+ * @param string[] $lookup
* @param bool $reverse
*
* @return bool
//get all required contacts detail.
if (!empty($contactIds)) {
- // get the contact details.
- list($currentContactDetails) = CRM_Utils_Token::getTokenDetails($contactIds, NULL,
- FALSE, FALSE, NULL,
- [],
- 'CRM_Event_BAO_Participant'
- );
- foreach ($currentContactDetails as $contactId => $contactValues) {
- $contactDetails[$contactId] = $contactValues;
- }
+ $contactDetails += civicrm_api3('Contact', 'get', ['id' => ['IN' => $contactIds, 'return' => 'display_name']])['values'];
}
//get all required events detail.
$mail = self::sendTransitionParticipantMail($additionalId,
$participantDetails[$additionalId],
$eventDetails[$participantDetails[$additionalId]['event_id']],
- $contactDetails[$participantDetails[$additionalId]['contact_id']],
+ NULL,
$emailType
);
$mail = self::sendTransitionParticipantMail($participantId,
$participantValues,
$eventDetails[$participantValues['event_id']],
- $contactDetails[$participantValues['contact_id']],
+ NULL,
$emailType
);
*
* @return string
*/
- public function updateStatusMessage($participantId, $statusChangeTo, $fromStatusId) {
+ public static function updateStatusMessage($participantId, $statusChangeTo, $fromStatusId) {
$statusMsg = NULL;
$results = self::transitionParticipants([$participantId],
$statusChangeTo, $fromStatusId, TRUE
* @param int $newStatusId
* New status.
*
- * @return bool
- * true if allowed
+ * @return array
*/
public static function getValidAdditionalIds($participantId, $oldStatusId, $newStatusId) {