function _civicrm_entity_option_addformatters in CiviCRM Entity 7.2
Utility function to provide option fields with option value or option id formatters
Parameters
$entity_type:
$option_fields:
$fields:
1 call to _civicrm_entity_option_addformatters()
- civicrm_entity_ds_fields_info in ./
civicrm_entity.module - Implements hook_ds_fields_info().
File
- ./
civicrm_entity.ds.inc, line 110
Code
function _civicrm_entity_option_addformatters($entity_type, $option_fields, &$fields) {
foreach ($option_fields as $name) {
$fields[$entity_type][$name]['properties']['formatters'] = array(
'default' => 'Option ID',
'civicrm_option_value' => 'Option Value',
);
}
}