* @return mixed
*/
protected function alterLocationTypeID($value, &$row, $selectedfield, $criteriaFieldName) {
- $values = $this->getLocationTypeOptions();
- return CRM_Utils_Array::value($value, $values);
+ return CRM_Core_PseudoConstant::getLabel('CRM_Core_DAO_Address', 'location_type_id', $value);
}
/**
$entryFound = TRUE;
}
}
+
+ // Handle employer id
+ if (array_key_exists('civicrm_contact_employer_id', $row)) {
+ $employerId = $row['civicrm_contact_employer_id'];
+ if ($employerId) {
+ $rows[$rowNum]['civicrm_contact_employer_id'] = CRM_Contact_BAO_Contact::displayName($employerId);
+ $rows[$rowNum]['civicrm_contact_employer_id_link'] = CRM_Utils_System::url('civicrm/contact/view', 'reset=1&cid=' . $employerId, $this->_absoluteUrl);
+ $rows[$rowNum]['civicrm_contact_employer_id_hover'] = ts('View Contact Summary for Employer.');
+ $entryFound = TRUE;
+ }
+ }
+
return $entryFound;
}
'is_opt_out' => array(),
'is_deceased' => array(),
'preferred_language' => array(),
+ 'employer_id' => array(
+ 'title' => ts('Current Employer'),
+ ),
);
}
* @param array $field
* @param string $table
*/
- private function setEntityRefDefaults(&$field, $table) {
+ public function setEntityRefDefaults(&$field, $table) {
$field['attributes'] = $field['attributes'] ? $field['attributes'] : array();
$field['attributes'] += array(
'entity' => CRM_Core_DAO_AllCoreTables::getBriefName(CRM_Core_DAO_AllCoreTables::getClassForTable($table)),
'is_filters' => TRUE,
'is_fields' => TRUE,
),
- $options['prefix'] . 'street_name' => array(
- 'name' => 'street_name',
- 'title' => ts($options['prefix_label'] . 'Street Name'),
- 'type' => 1,
- 'is_fields' => TRUE,
- ),
$options['prefix'] . 'street_unit' => array(
'name' => 'street_unit',
'title' => ts($options['prefix_label'] . 'Street Unit'),