foreach (CRM_Contact_BAO_Contact::$_greetingTypes as $greeting) {
if ($greetingType = CRM_Utils_Array::value($greeting, $fields)) {
- $customizedValue = CRM_Core_OptionGroup::getValue($greeting, 'Customized', 'name');
+ $customizedValue = CRM_Core_PseudoConstant::getKey('CRM_Contact_BAO_Contact', $greeting . '_id', 'Customized');
if ($customizedValue == $greetingType && empty($fielse[$greeting . '_custom'])) {
$errors[$greeting . '_custom'] = ts('Custom %1 is a required field if %1 is of type Customized.',
array(1 => ucwords(str_replace('_', " ", $greeting)))
//else (for contribution), use configured SCT default value
$SCTDefaultValue = CRM_Core_OptionGroup::getDefaultValue("soft_credit_type");
if ($field['field_type'] == 'Membership') {
- $SCTDefaultValue = CRM_Core_OptionGroup::getValue('soft_credit_type', 'Gift', 'name');
+ $SCTDefaultValue = CRM_Core_PseudoConstant::getKey('CRM_Contribute_BAO_ContributionSoft', 'soft_credit_type_id', 'gift');
}
$form->addElement('hidden', 'sct_default_id', $SCTDefaultValue, array('id' => 'sct_default_id'));
}
$groupTypeName = "{$customGroups->extends}Type";
if ($customGroups->extends == 'Participant' && $customGroups->extends_entity_column_id) {
- $groupTypeName = CRM_Core_OptionGroup::getValue('custom_data_type', $customGroups->extends_entity_column_id, 'value', 'String', 'name');
+ $groupTypeName = CRM_Core_PseudoConstant::getName('CRM_Core_DAO_CustomGroup', 'extends_entity_column_id', $customGroups->extends_entity_column_id);
}
foreach (explode(CRM_Core_DAO::VALUE_SEPARATOR, $customGroups->extends_entity_column_value) as $val) {
*
* Generated from xml/schema/CRM/Core/CustomGroup.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:4b960c311aed67174e9c55901ba3993b)
+ * (GenCodeChecksum:e0236d574279679e242f45bc73c4680a)
*/
/**
'entity' => 'CustomGroup',
'bao' => 'CRM_Core_BAO_CustomGroup',
'localizable' => 0,
+ 'html' => [
+ 'type' => 'Select',
+ ],
+ 'pseudoconstant' => [
+ 'optionGroupName' => 'custom_data_type',
+ 'optionEditPath' => 'civicrm/admin/options/custom_data_type',
+ ]
],
'extends_entity_column_value' => [
'name' => 'extends_entity_column_value',
foreach (CRM_Contact_BAO_Contact::$_greetingTypes as $greeting) {
if ($greetingType = CRM_Utils_Array::value($greeting, $self->_params[0])) {
- $customizedValue = CRM_Core_OptionGroup::getValue($greeting, 'Customized', 'name');
+ $customizedValue = CRM_Core_PseudoConstant::getKey('CRM_Contact_BAO_Contact', $greeting . '_id', 'Customized');
if ($customizedValue == $greetingType && empty($self->_params[0][$greeting . '_custom'])) {
return FALSE;
}
foreach (CRM_Contact_BAO_Contact::$_greetingTypes as $greeting) {
if ($greetingType = CRM_Utils_Array::value($greeting, $fields)) {
- $customizedValue = CRM_Core_OptionGroup::getValue($greeting, 'Customized', 'name');
+ $customizedValue = CRM_Core_PseudoConstant::getKey('CRM_Contact_BAO_Contact', $greeting . '_id', 'Customized');
if ($customizedValue == $greetingType && empty($fields[$greeting . '_custom'])) {
$errors[$greeting . '_custom'] = ts('Custom %1 is a required field if %1 is of type Customized.',
array(1 => ucwords(str_replace('_', ' ', $greeting)))
<title>Custom Group Subtype List</title>
<default>NULL</default>
<comment>FK to civicrm_option_value.id (for option group custom_data_type.)</comment>
+ <pseudoconstant>
+ <optionGroupName>custom_data_type</optionGroupName>
+ </pseudoconstant>
<add>2.2</add>
+ <html>
+ <type>Select</type>
+ </html>
</field>
<field>
<name>extends_entity_column_value</name>