// There is no reason not to add links for all fields but it seems a bit odd to be able to click on
// 'Mrs'. Also, we don't have metadata about the title. So, add selectively to addLinks.
$addLinks = array('gender_id' => 'Gender');
- foreach (array('prefix_id', 'suffix_id', 'gender_id') as $fieldName) {
+ foreach (array('prefix_id', 'suffix_id', 'gender_id', 'contact_sub_type', 'preferred_language') as $fieldName) {
if (array_key_exists('civicrm_contact_' . $fieldName, $row)) {
if (($value = $row['civicrm_contact_' . $fieldName]) != FALSE) {
- $rows[$rowNum]['civicrm_contact_' . $fieldName] = CRM_Core_Pseudoconstant::getLabel('CRM_Contact_BAO_Contact', $fieldName, $value);
+ $rowValues = explode(CRM_Core_DAO::VALUE_SEPARATOR, $value);
+ $rowLabels = array();
+ foreach ($rowValues as $rowValue) {
+ if ($rowValue) {
+ $rowLabels[] = CRM_Core_Pseudoconstant::getLabel('CRM_Contact_BAO_Contact', $fieldName, $rowValue);
+ }
+ }
+ $rows[$rowNum]['civicrm_contact_' . $fieldName] = implode(', ', $rowLabels);
if ($baseUrl && ($title = CRM_Utils_Array::value($fieldName, $addLinks)) != FALSE) {
$this->addLinkToRow($rows[$rowNum], $baseUrl, $linkText, $value, $fieldName, 'civicrm_contact', $title);
}
'do_not_sms' => array(),
'is_opt_out' => array(),
'is_deceased' => array(),
+ 'preferred_language' => array(),
);
}
'title' => ts('Do not bulk email'),
'type' => CRM_Utils_Type::T_BOOLEAN,
),
+ 'preferred_language' => array(
+ 'title' => ts('Preferred Language'),
+ ),
);
}
$this->endPostProcess($rows);
}
- /**
- * Initialise basic row.
- *
- * @param array $rows
- *
- * @param bool $entryFound
- * @param array $row
- * @param int $rowId
- * @param int $rowNum
- * @param array $types
- *
- * @return bool
- */
- private function _initBasicRow(&$rows, &$entryFound, $row, $rowId, $rowNum, $types) {
- if (!array_key_exists($rowId, $row)) {
- return FALSE;
- }
-
- $value = $row[$rowId];
- if ($value) {
- $rows[$rowNum][$rowId] = $types[$value];
- }
- $entryFound = TRUE;
- }
-
/**
* Alter display of rows.
*