*/
protected $_contributionIds;
- /**
- * The array that holds all the mapping contribution and contact ids.
- *
- * @var array
- */
- protected $_contributionContactIds = [];
-
/**
* Build all the data structures needed to build the form.
*/
$result = $form->getSearchQueryResults();
while ($result->fetch()) {
$ids[] = $result->contribution_id;
- if ($form->isQueryIncludesSoftCredits()) {
- $form->_contactIds[$result->contact_id] = $result->contact_id;
- $form->_contributionContactIds["{$result->contact_id}-{$result->contribution_id}"] = $result->contribution_id;
- }
}
$form->assign('totalSelectedContributions', $form->get('rowCount'));
}
*
* @param \CRM_Contribute_Form_Task_PDFLetter $form
* @param array $formValues
+ *
+ * @throws \CRM_Core_Exception
*/
public static function postProcess(&$form, $formValues = NULL) {
if (empty($formValues)) {
$skipDeceased = $form->skipDeceased ?? TRUE;
$contributionIDs = $form->getVar('_contributionIds');
if ($form->isQueryIncludesSoftCredits()) {
- //@todo - comment on what is stored there
- $contributionIDs = $form->getVar('_contributionContactIds');
+ $contributionIDs = [];
+ $result = $form->getSearchQueryResults();
+ while ($result->fetch()) {
+ $form->_contactIds[$result->contact_id] = $result->contact_id;
+ $contributionIDs["{$result->contact_id}-{$result->contribution_id}"] = $result->contribution_id;
+ }
}
[$contributions, $contacts] = self::buildContributionArray($groupBy, $contributionIDs, $returnProperties, $skipOnHold, $skipDeceased, $messageToken, $task, $separator, $form->isQueryIncludesSoftCredits());
$html = [];