function units_field_field_formatter_settings_summary in Units of Measurement 7.2
Implements hook_field_formatter_settings_summary().
File
- units_field/
units_field.module, line 256 - Provide field type for storing measured values.
Code
function units_field_field_formatter_settings_summary($field, $instance, $view_mode) {
$display = $instance['display'][$view_mode];
$summary = '';
switch ($display['type']) {
case 'units_value_expression':
$mathematical_expression = units_field_display_mathematical_expression($display);
$summary = $mathematical_expression ? check_plain($mathematical_expression
->getExpression()
->toInfix()) : t('Original');
break;
}
return $summary;
}