'communication_style_id' => 'communication_style',
];
- /**
- * The cache to translate the option values into labels.
- *
- * @var array
- */
- public $_options;
-
/**
* Are we in search mode.
*
$this->_whereTables = [];
$this->_where = [];
$this->_qill = [];
- $this->_options = [];
$this->_cfIDs = [];
$this->_paramLookup = [];
$this->_having = [];
$this->_select = array_merge($this->_select, $this->_customQuery->_select);
$this->_element = array_merge($this->_element, $this->_customQuery->_element);
$this->_tables = array_merge($this->_tables, $this->_customQuery->_tables);
- $this->_options = $this->_customQuery->_options;
}
$isForcePrimaryOnly = !empty($apiEntity);
$this->_whereClause = $this->whereClause($isForcePrimaryOnly);
}
$field = $this->_fields[$elementName] ?? NULL;
+ if (isset($this->_pseudoConstantsSelect[$field['name']])) {
+ $this->_pseudoConstantsSelect[$name . '-' . $field['name']] = $this->_pseudoConstantsSelect[$field['name']];
+ }
// hack for profile, add location id
if (!$field) {
$name, $op, $value, $grouping,
'CRM_Contact_DAO_Contact',
$field,
- $field['title'],
+ $field['html']['label'] ?? $field['title'],
CRM_Utils_Type::typeToString($dataType)
);
if ($name === 'gender_id') {
list($select, $from, $where, $having) = $query->query($count);
- $options = $query->_options;
if (!empty($query->_permissionWhereClause)) {
if (!empty($query->_permissionFromClause) && !stripos($from, 'aclContactCache')) {
$from .= " $query->_permissionFromClause";
}
$values[$dao->$entityIDField] = $val;
}
- return [$values, $options];
+ return [$values];
}
/**
return $field;
}
+ /**
+ * Get the field datatype, using the type in the database rather than the pseudofield, if a pseudofield.
+ *
+ * @param string $fieldName
+ *
+ * @return string
+ */
+ public function getDataTypeForRealField($fieldName) {
+ return CRM_Utils_Type::typeToString($this->getMetadataForRealField($fieldName)['type']);
+ }
+
/**
* If we have a field that is better rendered via the pseudoconstant handled them here.
*