function _civicrm_entity_yesno_addformatters in CiviCRM Entity 7.2
Utility function to add provided boolean fields with yes/no and true/false formatters
Parameters
$entity_type:
$yes_no_fields:
$fields:
1 call to _civicrm_entity_yesno_addformatters()
- civicrm_entity_ds_fields_info in ./
civicrm_entity.module - Implements hook_ds_fields_info().
File
- ./
civicrm_entity.ds.inc, line 93
Code
function _civicrm_entity_yesno_addformatters($entity_type, $yes_no_fields, &$fields) {
foreach ($yes_no_fields as $name) {
$fields[$entity_type][$name]['properties']['formatters'] = array(
'default' => 'Raw Value',
'civicrm_yes_no' => 'Yes/No',
'civicrm_true_false' => 'True/False',
);
}
}