+ /**
+ * Get the rows form the search, keyed to make the token processor happy.
+ *
+ * @throws \API_Exception
+ */
+ protected function getRows(): array {
+ if (empty($this->rows)) {
+ // checkPermissions set to false - in case form is bypassing in some way.
+ $participants = Participant::get(FALSE)
+ ->addWhere('id', 'IN', $this->getIDs())
+ ->setSelect(['id', 'contact_id'])->execute();
+ foreach ($participants as $participant) {
+ $this->rows[] = [
+ 'contact_id' => $participant['contact_id'],
+ 'participant_id' => $participant['id'],
+ 'schema' => [
+ 'contactId' => $participant['contact_id'],
+ 'participantId' => $participant['id'],
+ ],
+ ];
+ }
+ }
+ return $this->rows;
+ }
+
+ /**
+ * Get the token processor schema required to list any tokens for this task.
+ *
+ * @return array
+ */
+ public function getTokenSchema(): array {
+ return ['participantId', 'contactId', 'eventId'];
+ }
+