public function alterDisplay(&$rows) {
$entryFound = FALSE;
foreach ($rows as $rowNum => $row) {
- // make count columns point to detail report
- // convert display name to links
- if (array_key_exists('civicrm_contact_display_name', $row) &&
- array_key_exists('civicrm_contact_id', $row)
- ) {
- $url = CRM_Report_Utils_Report::getNextUrl('contact/detail',
- 'reset=1&force=1&id_op=eq&id_value=' . $row['civicrm_contact_id'],
- $this->_absoluteUrl, $this->_id, $this->_drilldownReport
- );
- $rows[$rowNum]['civicrm_contact_display_name_link'] = $url;
- $rows[$rowNum]['civicrm_contact_display_name_hover'] = ts("View Contact details for this contact.");
- $entryFound = TRUE;
- }
-
- // handle country
- if (array_key_exists('civicrm_address_country_id', $row)) {
- if ($value = $row['civicrm_address_country_id']) {
- $rows[$rowNum]['civicrm_address_country_id'] = CRM_Core_PseudoConstant::country($value, FALSE);
- }
- $entryFound = TRUE;
- }
- if (array_key_exists('civicrm_address_state_province_id', $row)) {
- if ($value = $row['civicrm_address_state_province_id']) {
- $rows[$rowNum]['civicrm_address_state_province_id'] = CRM_Core_PseudoConstant::stateProvince($value, FALSE);
- }
- $entryFound = TRUE;
- }
-
// skip looking further in rows, if first row itself doesn't
// have the column we need
if (!$entryFound) {