/** * Modify the content of each row * * @param array $row modifiable SQL result row * @throws exception if function getOptionGroup not found * @return void */ function alterRow(&$row) { $row['earmarking'] = CRM_Earmarking_Earmarking::getRecurringEarmarkingForContact($row['contact_id']); $row['contribution_count'] = $this->getRecurringCountForContact($row['contact_id']); $row['payment_type'] = $this->getPaymentTypesForContact($row['contact_id']); }
/** * Implementation of hook civicrm_pageRun to add element for mearmarking of recurring (BOS1506294) * * @param object $page */ function earmarking_civicrm_pageRun(&$page) { $pageName = $page->getVar('_name'); if ($pageName == 'CRM_Contact_Page_View_Summary') { $contactId = $page->getVar('_contactId'); $page->assign('earmarking', CRM_Earmarking_Earmarking::getRecurringEarmarkingForContact($contactId)); } }